From 407738f553077e0fa0024502bf3a1fba84ddb927 Mon Sep 17 00:00:00 2001 From: James Campos Date: Thu, 21 Jul 2011 18:18:46 -0700 Subject: [PATCH] bind instead of call --- 4chan_x.user.js | 10 +++++----- script.coffee | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d6994888a..116c1504a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1588,6 +1588,7 @@ $.bind(verbose, 'click', updater.cb.verbose); $.bind(autoUpT, 'click', updater.cb.autoUpdate); $.bind(interva, 'change', updater.cb.interval); + $.bind(interva, 'change', $.cb.value); $.bind(updNow, 'click', updater.updateNow); updater.count = $('#count', dialog); updater.timer = $('#timer', dialog); @@ -1616,8 +1617,7 @@ } }, interval: function() { - updater.interval = this.value = this.value.match(/\d+/)[0]; - return $.cb.value.call(this); + return updater.interval = this.value = this.value.match(/\d+/)[0]; }, update: function() { var arr, body, br, id, input, replies, reply, _i, _len, _ref, _ref2; @@ -2140,7 +2140,8 @@ } $.bind(quote, 'mouseover', quotePreview.mouseover); $.bind(quote, 'mousemove', ui.hover); - _results.push($.bind(quote, 'mouseout', quotePreview.mouseout)); + $.bind(quote, 'mouseout', quotePreview.mouseout); + _results.push($.bind(quote, 'msoueout', ui.hoverend)); } return _results; }); @@ -2179,9 +2180,8 @@ mouseout: function() { var el; if (el = d.getElementById(this.hash.slice(1))) { - $.removeClass(el, 'qphl'); + return $.removeClass(el, 'qphl'); } - return ui.hoverend(); }, parse: function(req, id, threadID) { var body, html, op, qp, reply, _i, _len, _ref; diff --git a/script.coffee b/script.coffee index 0d3124724..8e19b3fb7 100644 --- a/script.coffee +++ b/script.coffee @@ -1292,6 +1292,7 @@ updater = $.bind verbose, 'click', updater.cb.verbose $.bind autoUpT, 'click', updater.cb.autoUpdate $.bind interva, 'change', updater.cb.interval + $.bind interva, 'change', $.cb.value $.bind updNow, 'click', updater.updateNow updater.count = $ '#count', dialog @@ -1319,7 +1320,6 @@ updater = window.clearInterval updater.intervalID interval: -> updater.interval = @value = @value.match(/\d+/)[0] - $.cb.value.call @ update: -> if @status is 404 updater.timer.textContent = '' @@ -1663,6 +1663,7 @@ quotePreview = $.bind quote, 'mouseover', quotePreview.mouseover $.bind quote, 'mousemove', ui.hover $.bind quote, 'mouseout', quotePreview.mouseout + $.bind quote, 'msoueout', ui.hoverend mouseover: (e) -> qp = ui.el = $.el 'div', id: 'qp' @@ -1684,7 +1685,6 @@ quotePreview = $.cache @pathname, (-> quotePreview.parse @, id, threadID) mouseout: -> $.removeClass el, 'qphl' if el = d.getElementById @hash[1..] - ui.hoverend() parse: (req, id, threadID) -> return unless (qp = ui.el) and (qp.innerHTML is "Loading #{id}...")