From 1ab233727e26efbc388b5ae29ef15b2cee2bba20 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 18 May 2011 22:19:35 -0700 Subject: [PATCH] position hovering elements on mouseover --- 4chan_x.js | 10 ++++++---- script.coffee | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 027699b62..e245129bc 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1850,9 +1850,10 @@ })); } } - $.show(qp); ui.el = qp; - return ui.winHeight = d.body.clientHeight; + ui.winHeight = d.body.clientHeight; + $.show(qp); + return ui.hover(e); }, parse: function(req, id, threadID) { var body, html, op, qp, reply, _i, _len, _ref; @@ -2087,9 +2088,10 @@ el = $('#iHover'); el.src = null; el.src = this.parentNode.href; - $.show(el); ui.el = el; - return ui.winHeight = d.body.clientHeight; + ui.winHeight = d.body.clientHeight; + $.show(el); + return ui.hover(e); } } }; diff --git a/script.coffee b/script.coffee index 8d5e1debf..9b526ddff 100644 --- a/script.coffee +++ b/script.coffee @@ -1465,9 +1465,10 @@ quotePreview = quotePreview.parse req, id, threadID else g.requests[threadID] = $.get @href, (-> quotePreview.parse this, id, threadID) - $.show qp ui.el = qp ui.winHeight = d.body.clientHeight + $.show qp + ui.hover e parse: (req, id, threadID) -> qp = $ '#qp' return unless qp.innerHTML is "Loading #{id}..." @@ -1616,9 +1617,10 @@ imageHover = el = $ '#iHover' el.src = null el.src = @parentNode.href - $.show el ui.el = el ui.winHeight = d.body.clientHeight + $.show el + ui.hover e imgPreloading = init: ->