From 338679b658581ddb11d246534acb244134335ab7 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 8 Oct 2011 12:27:21 -0700 Subject: [PATCH] shave a line --- 4chan_x.user.js | 5 ++--- script.coffee | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 7c1627e0f..fc30af38b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -230,8 +230,7 @@ return ui.height = d.body.clientHeight - el.offsetHeight; }, drag: function(e) { - var bottom, el, left, right, style, top; - el = ui.el; + var bottom, left, right, style, top; left = e.clientX - ui.dx; if (left < 10) { left = '0'; @@ -246,7 +245,7 @@ top = null; } bottom = top ? null : 0; - style = el.style; + style = ui.el.style; style.top = top; style.right = right; style.bottom = bottom; diff --git a/script.coffee b/script.coffee index 4426c3db9..0bee99690 100644 --- a/script.coffee +++ b/script.coffee @@ -151,7 +151,6 @@ ui = ui.width = d.body.clientWidth - el.offsetWidth ui.height = d.body.clientHeight - el.offsetHeight drag: (e) -> - {el} = ui left = e.clientX - ui.dx if left < 10 then left = '0' else if ui.width - left < 10 then left = null @@ -162,7 +161,7 @@ ui = bottom = if top then null else 0 #using null instead of '' is 4% faster #these 4 statements are 40% faster than 1 style.cssText - {style} = el + {style} = ui.el style.top = top style.right = right style.bottom = bottom