From 19bfaa923dee83bdae4a695ae9b3a810b78840df Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 9 May 2011 18:34:51 +0200 Subject: [PATCH] Make the quote preview work with updates --- 4chan_x.js | 7 ++++++- script.coffee | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 4e83be2b1..e4ef9b130 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1706,6 +1706,11 @@ className: 'backlink', textContent: '>>' + id }); + if ($.config('Quote Preview')) { + $.bind(link, 'mouseover', quotePreview.mouseover); + $.bind(link, 'mousemove', ui.hover); + $.bind(link, 'mouseout', ui.hoverend); + } return $.before($('br, blockquote', el), link); } } @@ -1728,7 +1733,7 @@ }, node: function(root) { var quote, _i, _len, _ref, _results; - _ref = $$('a.quotelink, a.backlink', root); + _ref = $$('a.quotelink', root); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { quote = _ref[_i]; diff --git a/script.coffee b/script.coffee index b77a08847..9b1ad3463 100644 --- a/script.coffee +++ b/script.coffee @@ -1359,6 +1359,10 @@ quoteBacklink = href: '#'+id className: 'backlink' textContent: '>>'+id + if $.config 'Quote Preview' + $.bind link, 'mouseover', quotePreview.mouseover + $.bind link, 'mousemove', ui.hover + $.bind link, 'mouseout', ui.hoverend $.before $('br, blockquote', el), link quotePreview = @@ -1370,7 +1374,7 @@ quotePreview = $.hide preview $.append d.body, preview node: (root) -> - for quote in $$ 'a.quotelink, a.backlink', root + for quote in $$ 'a.quotelink', root $.bind quote, 'mouseover', quotePreview.mouseover $.bind quote, 'mousemove', ui.hover $.bind quote, 'mouseout', ui.hoverend