Fix isInlined and isCrosspost.

Derp.
This commit is contained in:
Nicolas Stepien 2012-05-03 13:42:46 +02:00
parent dc3f6b93a4
commit 43ecd1c761
2 changed files with 13 additions and 13 deletions

View File

@ -3402,7 +3402,7 @@
},
node: function(post) {
var a;
if (!(a = $('.reportbutton', post.el))) {
if (!(a = $('.report_button', post.el))) {
a = ReportButton.a.cloneNode(true);
$.add($('.postInfo', post.el), a);
}
@ -4121,17 +4121,17 @@
}
},
preParse: function(node) {
var el, fileInfo, img, klass, post;
var el, fileInfo, img, post, rootClass;
rootClass = node.className;
el = $('.post', node);
klass = el.className;
post = {
root: node,
el: el,
"class": klass,
"class": el.className,
id: el.id.slice(1),
threadId: g.THREAD_ID || $.x('ancestor::div[@class="thread"]', node).id.slice(1),
isInlined: /\binline\b/.test(klass),
isCrosspost: /\bcrosspost\b/.test(klass),
isInlined: /\binline\b/.test(rootClass),
isCrosspost: /\bcrosspost\b/.test(rootClass),
quotes: el.getElementsByClassName('quotelink'),
backlinks: el.getElementsByClassName('backlink'),
fileInfo: false,

View File

@ -2625,7 +2625,7 @@ ReportButton =
href: 'javascript:;'
Main.callbacks.push @node
node: (post) ->
unless a = $ '.reportbutton', post.el
unless a = $ '.report_button', post.el
a = ReportButton.a.cloneNode true
$.add $('.postInfo', post.el), a
$.on a, 'click', ReportButton.report
@ -3157,16 +3157,16 @@ Main =
window.location = "https://raw.github.com/mayhemydg/4chan-x/#{version}/4chan_x.user.js"
preParse: (node) ->
el = $ '.post', node
klass = el.className
post =
rootClass = node.className
el = $ '.post', node
post =
root: node
el: el
class: klass
class: el.className
id: el.id[1..]
threadId: g.THREAD_ID or $.x('ancestor::div[@class="thread"]', node).id[1..]
isInlined: /\binline\b/.test klass
isCrosspost: /\bcrosspost\b/.test klass
isInlined: /\binline\b/.test rootClass
isCrosspost: /\bcrosspost\b/.test rootClass
quotes: el.getElementsByClassName 'quotelink'
backlinks: el.getElementsByClassName 'backlink'
fileInfo: false