Don't preParse isOP, as it's only used in the filter and is incorrect or ambiguous for inlined posts.

This commit is contained in:
Nicolas Stepien 2012-03-17 13:08:41 +01:00
parent 9a8fee2e3c
commit ed3cc48d3f
2 changed files with 2 additions and 2 deletions

View File

@ -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'),

View File

@ -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'