# HG changeset patch # User Matti Hamalainen # Date 1509045625 -10800 # Node ID 57276229a8c831287c5cc8fb1f744879f3d0f59b # Parent 7db813d0d2a683a0fb8c53f14b8fb8e09dc927e7 Cleanups. diff -r 7db813d0d2a6 -r 57276229a8c8 tooltip.js --- a/tooltip.js Thu Oct 26 21:49:40 2017 +0300 +++ b/tooltip.js Thu Oct 26 22:20:25 2017 +0300 @@ -38,8 +38,8 @@ // Update the tooltip box function utt(e) { - x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX; - y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY; + var x = document.all ? (window.event.x + document.body.scrollLeft) : e.pageX; + var y = document.all ? (window.event.y + document.body.scrollTop) : e.pageY; if (mytt != null) { var winW = 0, winH = 0; @@ -74,7 +74,8 @@ else y += 15; - myx = x; myy = y; + myx = x; + myy = y; mytt.style.left = x + "px"; mytt.style.top = y + "px";