Fix thread selector in case of inexact class (highlighted for example).
This commit is contained in:
parent
fb5b361f86
commit
78426e6d22
@ -1292,7 +1292,7 @@
|
||||
this.focus(post);
|
||||
return;
|
||||
}
|
||||
if (!(g.REPLY || $.x('ancestor::div[@class="thread"]', next) === thread)) {
|
||||
if (!(g.REPLY || $.x('ancestor::div[parent::div[@class="board"]]', next) === thread)) {
|
||||
return;
|
||||
}
|
||||
rect = next.getBoundingClientRect();
|
||||
@ -1543,7 +1543,7 @@
|
||||
}
|
||||
QR.open();
|
||||
if (!g.REPLY) {
|
||||
$('select', QR.el).value = $.x('ancestor::div[@class="thread"]', this).id.slice(1);
|
||||
$('select', QR.el).value = $.x('ancestor::div[parent::div[@class="board"]]', this).id.slice(1);
|
||||
}
|
||||
id = this.previousSibling.hash.slice(2);
|
||||
text = ">>" + id + "\n";
|
||||
@ -4139,7 +4139,7 @@
|
||||
el: el,
|
||||
"class": el.className,
|
||||
id: el.id.slice(1),
|
||||
threadId: g.THREAD_ID || $.x('ancestor::div[@class="thread"]', node).id.slice(1),
|
||||
threadId: g.THREAD_ID || $.x('ancestor::div[parent::div[@class="board"]]', node).id.slice(1),
|
||||
isInlined: /\binline\b/.test(rootClass),
|
||||
isCrosspost: /\bcrosspost\b/.test(rootClass),
|
||||
quotes: el.getElementsByClassName('quotelink'),
|
||||
|
||||
@ -972,7 +972,7 @@ Keybinds =
|
||||
unless next
|
||||
@focus post
|
||||
return
|
||||
return unless g.REPLY or $.x('ancestor::div[@class="thread"]', next) is thread
|
||||
return unless g.REPLY or $.x('ancestor::div[parent::div[@class="board"]]', next) is thread
|
||||
rect = next.getBoundingClientRect()
|
||||
if rect.top < 0 or rect.bottom > d.documentElement.clientHeight
|
||||
next.scrollIntoView delta is -1
|
||||
@ -1158,7 +1158,7 @@ QR =
|
||||
e?.preventDefault()
|
||||
QR.open()
|
||||
unless g.REPLY
|
||||
$('select', QR.el).value = $.x('ancestor::div[@class="thread"]', @).id[1..]
|
||||
$('select', QR.el).value = $.x('ancestor::div[parent::div[@class="board"]]', @).id[1..]
|
||||
# Make sure we get the correct number, even with XXX censors
|
||||
id = @previousSibling.hash[2..]
|
||||
text = ">>#{id}\n"
|
||||
@ -3179,7 +3179,7 @@ Main =
|
||||
el: el
|
||||
class: el.className
|
||||
id: el.id[1..]
|
||||
threadId: g.THREAD_ID or $.x('ancestor::div[@class="thread"]', node).id[1..]
|
||||
threadId: g.THREAD_ID or $.x('ancestor::div[parent::div[@class="board"]]', node).id[1..]
|
||||
isInlined: /\binline\b/.test rootClass
|
||||
isCrosspost: /\bcrosspost\b/.test rootClass
|
||||
quotes: el.getElementsByClassName 'quotelink'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user