From 85d612886f5142bb1e929e6a189711e26479e6d7 Mon Sep 17 00:00:00 2001 From: James Campos Date: Mon, 31 Oct 2011 09:23:38 -0700 Subject: [PATCH] Revert "do more outside the loop" This reverts commit f6d5c3309337cb369779036380ddec5816dda3e6. --- 4chan_x.user.js | 16 ++++++++-------- script.coffee | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) 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)