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