From afd2ade4c5223a0d37139737c365ded85f03ae7d Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 14 Mar 2012 00:17:05 +0100 Subject: [PATCH] Set 'onclick' attribute on backlinks when Quote Inlining is disabled. --- 4chan_x.user.js | 6 +++++- script.coffee | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index fb18bdda8..c9af8df0a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3089,7 +3089,11 @@ } link = a.cloneNode(true); if (conf['Quote Preview']) $.on(link, 'mouseover', QuotePreview.mouseover); - if (conf['Quote Inline']) $.on(link, 'click', QuoteInline.toggle); + if (conf['Quote Inline']) { + $.on(link, 'click', QuoteInline.toggle); + } else { + link.setAttribute('onclick', "replyhl('" + post.id + "');"); + } if (!((container = $('.container', el)) && container.parentNode === el)) { container = $.el('span', { className: 'container' diff --git a/script.coffee b/script.coffee index b1c29b339..d830bd6ed 100644 --- a/script.coffee +++ b/script.coffee @@ -2577,6 +2577,8 @@ QuoteBacklink = $.on link, 'mouseover', QuotePreview.mouseover if conf['Quote Inline'] $.on link, 'click', QuoteInline.toggle + else + link.setAttribute 'onclick', "replyhl('#{post.id}');" unless (container = $ '.container', el) and container.parentNode is el container = $.el 'span', className: 'container' $.add container, [$.tn(' '), link]