diff --git a/4chan_x.user.js b/4chan_x.user.js index 5d5ca3abf..17c038894 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2355,14 +2355,6 @@ className: root.hidden ? 'filtered backlink' : 'backlink', textContent: quoteBacklink.funk(id) }); - if (conf['Quote Preview']) { - $.bind(a, 'mouseover', quotePreview.mouseover); - $.bind(a, 'mousemove', ui.hover); - $.bind(a, 'mouseout', quotePreview.mouseout); - } - if (conf['Quote Inline']) { - $.bind(a, 'click', quoteInline.toggle); - } _results = []; for (qid in quotes) { if (!(el = $.id(qid))) { @@ -2372,6 +2364,14 @@ continue; } link = a.cloneNode(true); + if (conf['Quote Preview']) { + $.bind(link, 'mouseover', quotePreview.mouseover); + $.bind(link, 'mousemove', ui.hover); + $.bind(link, 'mouseout', quotePreview.mouseout); + } + if (conf['Quote Inline']) { + $.bind(link, 'click', quoteInline.toggle); + } if (!((container = $('.container', el)) && container.parentNode === el)) { container = $.el('span', { className: 'container' diff --git a/script.coffee b/script.coffee index 1c459f00a..870ee5c9e 100644 --- a/script.coffee +++ b/script.coffee @@ -1777,17 +1777,17 @@ quoteBacklink = href: "##{id}" className: if root.hidden then 'filtered backlink' else 'backlink' textContent: quoteBacklink.funk id - if conf['Quote Preview'] - $.bind a, 'mouseover', quotePreview.mouseover - $.bind a, 'mousemove', ui.hover - $.bind a, 'mouseout', quotePreview.mouseout - if conf['Quote Inline'] - $.bind a, 'click', quoteInline.toggle for qid of quotes continue unless el = $.id qid #don't backlink the op continue if !conf['OP Backlinks'] and el.className is 'op' link = a.cloneNode true + if conf['Quote Preview'] + $.bind link, 'mouseover', quotePreview.mouseover + $.bind link, 'mousemove', ui.hover + $.bind link, 'mouseout', quotePreview.mouseout + if conf['Quote Inline'] + $.bind link, 'click', quoteInline.toggle unless (container = $ '.container', el) and container.parentNode is el container = $.el 'span', className: 'container' root = $('.reportbutton', el) or $('span[id]', el)