diff --git a/4chan_x.user.js b/4chan_x.user.js index 341a8cd57..aa27efb2a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3203,7 +3203,7 @@ $.addClass(el, 'qphl'); } } - replyID = $.x('ancestor::div[contains(@class,"postContainer")]', this).id.slice(2); + replyID = $.x('ancestor::div[contains(@class,"postContainer")]', this).id.match(/\d+$/)[0]; _ref = $$('.quotelink, .backlink', qp); for (_i = 0, _len = _ref.length; _i < _len; _i++) { quote = _ref[_i]; diff --git a/script.coffee b/script.coffee index 1ed25ed4e..7055b03d6 100644 --- a/script.coffee +++ b/script.coffee @@ -2431,7 +2431,7 @@ QuotePreview = $.addClass el.parentNode, 'qphl' else $.addClass el, 'qphl' - replyID = $.x('ancestor::div[contains(@class,"postContainer")]', @).id[2..] + replyID = $.x('ancestor::div[contains(@class,"postContainer")]', @).id.match(/\d+$/)[0] for quote in $$ '.quotelink, .backlink', qp if quote.hash[2..] is replyID $.addClass quote, 'forwardlink'