diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index ccb3115e1..e1b426425 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -7650,6 +7650,9 @@ } if (Conf['Quote Inlining']) { $.on(a, 'click', QuoteInline.toggle); + if (Conf['Quote Hash Navigation']) { + QuoteInline.qiQuote(a, quoter.isHidden); + } } return frag; } @@ -7661,10 +7664,11 @@ return; } this.process = Conf['Quote Hash Navigation'] ? function(link, clone) { - if (!clone) { - $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'))); + $.on(link, 'click', QuoteInline.toggle); + if (clone) { + return; } - return $.on(link, 'click', QuoteInline.toggle); + return QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')); } : function(link) { return $.on(link, 'click', QuoteInline.toggle); }; @@ -7697,11 +7701,11 @@ if (hidden) { name += "filtered"; } - return $.el('a', { + return $.after(link, $.el('a', { className: name, textContent: '#', href: link.href - }); + })); }, toggle: function(e) { var boardID, context, postID, threadID, _ref; diff --git a/builds/crx/script.js b/builds/crx/script.js index fe5356e1c..1b2a93265 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -7702,6 +7702,9 @@ } if (Conf['Quote Inlining']) { $.on(a, 'click', QuoteInline.toggle); + if (Conf['Quote Hash Navigation']) { + QuoteInline.qiQuote(a, quoter.isHidden); + } } return frag; } @@ -7713,10 +7716,11 @@ return; } this.process = Conf['Quote Hash Navigation'] ? function(link, clone) { - if (!clone) { - $.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'))); + $.on(link, 'click', QuoteInline.toggle); + if (clone) { + return; } - return $.on(link, 'click', QuoteInline.toggle); + return QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')); } : function(link) { return $.on(link, 'click', QuoteInline.toggle); }; @@ -7749,11 +7753,11 @@ if (hidden) { name += "filtered"; } - return $.el('a', { + return $.after(link, $.el('a', { className: name, textContent: '#', href: link.href - }); + })); }, toggle: function(e) { var boardID, context, postID, threadID, _ref; diff --git a/src/Quotelinks/QuoteBacklink.coffee b/src/Quotelinks/QuoteBacklink.coffee index 3c9c5d24b..84b867ebd 100755 --- a/src/Quotelinks/QuoteBacklink.coffee +++ b/src/Quotelinks/QuoteBacklink.coffee @@ -70,4 +70,6 @@ QuoteBacklink = $.on a, 'mouseover', QuotePreview.mouseover if Conf['Quote Inlining'] $.on a, 'click', QuoteInline.toggle + if Conf['Quote Hash Navigation'] + QuoteInline.qiQuote a, quoter.isHidden frag diff --git a/src/Quotelinks/QuoteInline.coffee b/src/Quotelinks/QuoteInline.coffee index 95d44529f..ad6e9435a 100755 --- a/src/Quotelinks/QuoteInline.coffee +++ b/src/Quotelinks/QuoteInline.coffee @@ -4,8 +4,9 @@ QuoteInline = @process = if Conf['Quote Hash Navigation'] (link, clone) -> - $.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless clone $.on link, 'click', QuoteInline.toggle + return if clone + QuoteInline.qiQuote link, $.hasClass link, 'filtered' else (link) -> @@ -28,7 +29,7 @@ QuoteInline = qiQuote: (link, hidden) -> name = "hashlink" name += "filtered" if hidden - $.el 'a', + $.after link, $.el 'a', className: name textContent: '#' href: link.href