From 3650eb2af745c12fb1b3e103dea3daae01ae0822 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 26 Sep 2012 21:25:59 +0200 Subject: [PATCH] Having the quote previews top position flicker is quite annoying actually. --- 4chan_x.user.js | 2 +- lib/ui.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 821400d70..8c82cdb48 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -320,7 +320,7 @@ hover = function(e) { var clientX, height, top; height = this.el.offsetHeight; - top = e.clientY - height / 2; + top = e.clientY - 120; this.style.top = this.clientHeight <= height || top <= 0 ? '0px' : top + height >= this.clientHeight ? this.clientHeight - height + 'px' : top + 'px'; clientX = e.clientX; if (clientX <= this.clientWidth - 400) { diff --git a/lib/ui.coffee b/lib/ui.coffee index 1dd7eecc9..9380bd3fa 100644 --- a/lib/ui.coffee +++ b/lib/ui.coffee @@ -99,7 +99,7 @@ UI = (-> root.addEventListener 'mousemove', o.hover, false hover = (e) -> height = @el.offsetHeight - top = e.clientY - height / 2 + top = e.clientY - 120 @style.top = if @clientHeight <= height or top <= 0 '0px'