This commit is contained in:
Nicolas Stepien 2012-05-14 19:18:49 +02:00
parent d2437c4942
commit 16b4fd5424
2 changed files with 13 additions and 10 deletions

View File

@ -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');

View File

@ -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'