diff --git a/4chan_x.user.js b/4chan_x.user.js index 2f6499a53..c3d0ab3fd 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -592,6 +592,7 @@ node: function(post) { var el, filter, firstThread, isOP, key, result, thisThread, value, _i, _len, _ref; if (post.isInlined) return; + post.isOP = post["class"] === 'op'; isOP = post.isOP, el = post.el; for (key in Filter.filters) { value = Filter[key](post); @@ -4008,7 +4009,6 @@ "class": klass, id: node.getElementsByTagName('input')[0].name, threadId: g.THREAD_ID || $.x('ancestor::div[@class="thread"]', node).firstChild.id, - isOP: klass === 'op', isInlined: /\binline\b/.test(klass), filesize: node.getElementsByClassName('filesize')[0] || false, quotes: node.getElementsByClassName('quotelink'), diff --git a/script.coffee b/script.coffee index 3f0631cf0..30146cef2 100644 --- a/script.coffee +++ b/script.coffee @@ -524,6 +524,7 @@ Filter = node: (post) -> return if post.isInlined + post.isOP = post.class is 'op' {isOP, el} = post for key of Filter.filters value = Filter[key] post @@ -3365,7 +3366,6 @@ Main = class: klass id: node.getElementsByTagName('input')[0].name threadId: g.THREAD_ID or $.x('ancestor::div[@class="thread"]', node).firstChild.id - isOP: klass is 'op' isInlined: /\binline\b/.test klass filesize: node.getElementsByClassName('filesize')[0] or false quotes: node.getElementsByClassName 'quotelink'