Fix #471
This commit is contained in:
parent
d2437c4942
commit
16b4fd5424
@ -3119,10 +3119,12 @@
|
||||
return this.classList.toggle('inlined');
|
||||
},
|
||||
add: function(q, id) {
|
||||
var clonePost, el, i, inline, pathname, root;
|
||||
root = q;
|
||||
while (root.parentNode.nodeName !== 'BLOCKQUOTE') {
|
||||
root = root.parentNode;
|
||||
var clonePost, el, i, inline, isBacklink, pathname, root;
|
||||
if (!(isBacklink = /\bbacklink\b/.test(q.className))) {
|
||||
root = q;
|
||||
while (root.parentNode.nodeName !== 'BLOCKQUOTE') {
|
||||
root = root.parentNode;
|
||||
}
|
||||
}
|
||||
if (el = $.id("p" + id)) {
|
||||
if (/\bop\b/.test(el.className)) {
|
||||
@ -3131,7 +3133,7 @@
|
||||
$.removeClass(el, 'qphl');
|
||||
}
|
||||
clonePost = QuoteInline.clone(id, el);
|
||||
if (/\bbacklink\b/.test(q.className)) {
|
||||
if (isBacklink) {
|
||||
$.after(q.parentNode, clonePost);
|
||||
if (Conf['Forward Hiding']) {
|
||||
$.addClass(el.parentNode, 'forwarded');
|
||||
|
||||
@ -2404,16 +2404,17 @@ QuoteInline =
|
||||
add: (q, id) ->
|
||||
# Can't use this because Firefox a shit:
|
||||
# root = $.x 'ancestor::*[parent::blockquote]', q
|
||||
root = q
|
||||
while root.parentNode.nodeName isnt 'BLOCKQUOTE'
|
||||
root = root.parentNode
|
||||
if el = $.id "p#{id}"
|
||||
unless isBacklink = /\bbacklink\b/.test q.className
|
||||
root = q
|
||||
while root.parentNode.nodeName isnt 'BLOCKQUOTE'
|
||||
root = root.parentNode
|
||||
if el = $.id "p#{id}"
|
||||
if /\bop\b/.test el.className
|
||||
$.removeClass el.parentNode, 'qphl'
|
||||
else
|
||||
$.removeClass el, 'qphl'
|
||||
clonePost = QuoteInline.clone id, el
|
||||
if /\bbacklink\b/.test q.className
|
||||
if isBacklink
|
||||
$.after q.parentNode, clonePost
|
||||
if Conf['Forward Hiding']
|
||||
$.addClass el.parentNode, 'forwarded'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user