From 1cc10528c77d07a7d1d64e67ca48942cfc99f12f Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 13 Jul 2011 18:02:17 +0200 Subject: [PATCH] Shave some lines. position: fixed + top: auto = hidden --- 4chan_x.user.js | 11 +++-------- script.coffee | 5 ----- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 4c5014e2b..197e390f1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -267,8 +267,7 @@ } }, hoverend: function(e) { - ui.el.style.top = 'auto'; - return $.hide(ui.el); + return ui.el.style.top = 'auto'; } }; $ = function(selector, root) { @@ -2136,7 +2135,6 @@ id: 'qp', className: 'replyhl' }); - $.hide(preview); return $.append(d.body, preview); }, node: function(root) { @@ -2187,8 +2185,7 @@ return quotePreview.parse(this, id, threadID); })); } - ui.el = qp; - return $.show(qp); + return ui.el = qp; }, parse: function(req, id, threadID) { var body, html, op, qp, reply, _i, _len, _ref; @@ -2452,7 +2449,6 @@ img = $.el('img', { id: 'iHover' }); - $.hide(img); $.append(d.body, img); return g.callbacks.push(imageHover.node); }, @@ -2470,8 +2466,7 @@ el = $('#iHover'); el.src = null; el.src = this.parentNode.href; - ui.el = el; - return $.show(el); + return ui.el = el; } }; imgPreloading = { diff --git a/script.coffee b/script.coffee index f3ccb7cd4..0a17bb95e 100644 --- a/script.coffee +++ b/script.coffee @@ -183,7 +183,6 @@ ui = hoverend: (e) -> ui.el.style.top = 'auto' - $.hide ui.el $ = (selector, root=d.body) -> root.querySelector selector @@ -1664,7 +1663,6 @@ quotePreview = preview = $.el 'div', id: 'qp' className: 'replyhl' - $.hide preview $.append d.body, preview node: (root) -> for quote in $$ 'a.quotelink, a.backlink', root @@ -1691,7 +1689,6 @@ quotePreview = threadID = @pathname.split('/').pop() or $.x('ancestor::div[@class="thread"]/div', @).id $.cache @pathname, (-> quotePreview.parse @, id, threadID) ui.el = qp - $.show qp parse: (req, id, threadID) -> qp = $ '#qp' return unless qp.innerHTML is "Loading #{id}..." @@ -1856,7 +1853,6 @@ nodeInserted = (e) -> imageHover = init: -> img = $.el 'img', id: 'iHover' - $.hide img $.append d.body, img g.callbacks.push imageHover.node node: (root) -> @@ -1869,7 +1865,6 @@ imageHover = el.src = null el.src = @parentNode.href ui.el = el - $.show el imgPreloading = init: ->