post.id -> post.ID, post.threadId -> post.threadID
This commit is contained in:
parent
eefcf6b096
commit
1a078f6a0e
@ -613,7 +613,7 @@
|
||||
if (post.isInlined) {
|
||||
return;
|
||||
}
|
||||
isOP = post.id === post.threadId;
|
||||
isOP = post.ID === post.threadID;
|
||||
root = post.root;
|
||||
for (key in Filter.filters) {
|
||||
value = Filter[key](post);
|
||||
@ -787,7 +787,7 @@
|
||||
}
|
||||
post = {
|
||||
blockquote: node,
|
||||
threadId: threadID,
|
||||
threadID: threadID,
|
||||
quotes: quotes,
|
||||
backlinks: []
|
||||
};
|
||||
@ -1007,7 +1007,7 @@
|
||||
$.addClass(side, 'hide_reply_button');
|
||||
side.innerHTML = '<a href="javascript:;"><span>[ - ]</span></a>';
|
||||
$.on(side.firstChild, 'click', ReplyHiding.toggle);
|
||||
if (post.id in g.hiddenReplies) {
|
||||
if (post.ID in g.hiddenReplies) {
|
||||
return ReplyHiding.hide(post.root);
|
||||
}
|
||||
},
|
||||
@ -3361,9 +3361,9 @@
|
||||
}
|
||||
}
|
||||
a = $.el('a', {
|
||||
href: "#p" + post.id,
|
||||
href: "#p" + post.ID,
|
||||
className: post.el.hidden ? 'filtered backlink' : 'backlink',
|
||||
textContent: QuoteBacklink.funk(post.id)
|
||||
textContent: QuoteBacklink.funk(post.ID)
|
||||
});
|
||||
for (qid in quotes) {
|
||||
if (!(el = $.id("pi" + qid)) || !Conf['OP Backlinks'] && /\bop\b/.test(el.parentNode.className)) {
|
||||
@ -3376,7 +3376,7 @@
|
||||
if (Conf['Quote Inline']) {
|
||||
$.on(link, 'click', QuoteInline.toggle);
|
||||
} else {
|
||||
link.setAttribute('onclick', "replyhl('" + post.id + "');");
|
||||
link.setAttribute('onclick', "replyhl('" + post.ID + "');");
|
||||
}
|
||||
if (!(container = $.id("blc" + qid))) {
|
||||
container = $.el('span', {
|
||||
@ -3610,7 +3610,7 @@
|
||||
_ref = post.quotes;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
quote = _ref[_i];
|
||||
if (quote.hash.slice(2) === post.threadId) {
|
||||
if (quote.hash.slice(2) === post.threadID) {
|
||||
$.add(quote, $.tn('\u00A0(OP)'));
|
||||
}
|
||||
}
|
||||
@ -3633,7 +3633,7 @@
|
||||
continue;
|
||||
}
|
||||
path = quote.pathname.split('/');
|
||||
if (path[1] === g.BOARD && path[3] !== post.threadId) {
|
||||
if (path[1] === g.BOARD && path[3] !== post.threadID) {
|
||||
$.add(quote, $.tn('\u00A0(Cross-thread)'));
|
||||
}
|
||||
}
|
||||
@ -3834,7 +3834,7 @@
|
||||
foresee: [],
|
||||
node: function(post) {
|
||||
var count, el, index;
|
||||
if ((index = Unread.foresee.indexOf(post.id)) !== -1) {
|
||||
if ((index = Unread.foresee.indexOf(post.ID)) !== -1) {
|
||||
Unread.foresee.splice(index, 1);
|
||||
return;
|
||||
}
|
||||
@ -4580,8 +4580,8 @@
|
||||
root: node,
|
||||
el: el,
|
||||
"class": el.className,
|
||||
id: el.id.match(/\d+$/)[0],
|
||||
threadId: g.THREAD_ID || $.x('ancestor::div[parent::div[@class="board"]]', node).id.match(/\d+$/)[0],
|
||||
ID: el.id.match(/\d+$/)[0],
|
||||
threadID: g.THREAD_ID || $.x('ancestor::div[parent::div[@class="board"]]', node).id.match(/\d+$/)[0],
|
||||
isArchived: /\barchivedPost\b/.test(parentClass),
|
||||
isInlined: /\binline\b/.test(parentClass),
|
||||
isCrosspost: /\bcrosspost\b/.test(parentClass),
|
||||
|
||||
@ -490,7 +490,7 @@ Filter =
|
||||
|
||||
node: (post) ->
|
||||
return if post.isInlined
|
||||
isOP = post.id is post.threadId
|
||||
isOP = post.ID is post.threadID
|
||||
{root} = post
|
||||
for key of Filter.filters
|
||||
value = Filter[key] post
|
||||
@ -613,7 +613,7 @@ ExpandComment =
|
||||
quote.href = "res/#{href}" # Fix pathnames
|
||||
post =
|
||||
blockquote: node
|
||||
threadId: threadID
|
||||
threadID: threadID
|
||||
quotes: quotes
|
||||
backlinks: []
|
||||
if Conf['Resurrect Quotes']
|
||||
@ -769,7 +769,7 @@ ReplyHiding =
|
||||
side.innerHTML = '<a href="javascript:;"><span>[ - ]</span></a>'
|
||||
$.on side.firstChild, 'click', ReplyHiding.toggle
|
||||
|
||||
if post.id of g.hiddenReplies
|
||||
if post.ID of g.hiddenReplies
|
||||
ReplyHiding.hide post.root
|
||||
|
||||
toggle: ->
|
||||
@ -2623,9 +2623,9 @@ QuoteBacklink =
|
||||
# Duplicate quotes get overwritten.
|
||||
quotes[qid] = true
|
||||
a = $.el 'a',
|
||||
href: "#p#{post.id}"
|
||||
href: "#p#{post.ID}"
|
||||
className: if post.el.hidden then 'filtered backlink' else 'backlink'
|
||||
textContent: QuoteBacklink.funk post.id
|
||||
textContent: QuoteBacklink.funk post.ID
|
||||
for qid of quotes
|
||||
# Don't backlink the OP.
|
||||
continue if !(el = $.id "pi#{qid}") or !Conf['OP Backlinks'] and /\bop\b/.test el.parentNode.className
|
||||
@ -2635,7 +2635,7 @@ QuoteBacklink =
|
||||
if Conf['Quote Inline']
|
||||
$.on link, 'click', QuoteInline.toggle
|
||||
else
|
||||
link.setAttribute 'onclick', "replyhl('#{post.id}');"
|
||||
link.setAttribute 'onclick', "replyhl('#{post.ID}');"
|
||||
unless container = $.id "blc#{qid}"
|
||||
container = $.el 'span',
|
||||
className: 'container'
|
||||
@ -2801,7 +2801,7 @@ QuoteOP =
|
||||
node: (post) ->
|
||||
return if post.isInlined and not post.isCrosspost
|
||||
for quote in post.quotes
|
||||
if quote.hash[2..] is post.threadId
|
||||
if quote.hash[2..] is post.threadID
|
||||
# \u00A0 is nbsp
|
||||
$.add quote, $.tn '\u00A0(OP)'
|
||||
return
|
||||
@ -2817,7 +2817,7 @@ QuoteCT =
|
||||
continue
|
||||
path = quote.pathname.split '/'
|
||||
# If quote leads to a different thread id and is located on the same board.
|
||||
if path[1] is g.BOARD and path[3] isnt post.threadId
|
||||
if path[1] is g.BOARD and path[3] isnt post.threadID
|
||||
# \u00A0 is nbsp
|
||||
$.add quote, $.tn '\u00A0(Cross-thread)'
|
||||
return
|
||||
@ -2986,7 +2986,7 @@ Unread =
|
||||
foresee: []
|
||||
|
||||
node: (post) ->
|
||||
if (index = Unread.foresee.indexOf post.id) isnt -1
|
||||
if (index = Unread.foresee.indexOf post.ID) isnt -1
|
||||
Unread.foresee.splice index, 1
|
||||
return
|
||||
{el} = post
|
||||
@ -3553,8 +3553,8 @@ Main =
|
||||
root: node
|
||||
el: el
|
||||
class: el.className
|
||||
id: el.id.match(/\d+$/)[0]
|
||||
threadId: g.THREAD_ID or $.x('ancestor::div[parent::div[@class="board"]]', node).id.match(/\d+$/)[0]
|
||||
ID: el.id.match(/\d+$/)[0]
|
||||
threadID: g.THREAD_ID or $.x('ancestor::div[parent::div[@class="board"]]', node).id.match(/\d+$/)[0]
|
||||
isArchived: /\barchivedPost\b/.test parentClass
|
||||
isInlined: /\binline\b/.test parentClass
|
||||
isCrosspost: /\bcrosspost\b/.test parentClass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user