From 432d828af11320eb2bf7a9358c8590b11980f000 Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Wed, 31 Dec 2014 19:18:51 +0000 Subject: [PATCH] clean up the some of code formatting --- js/coinbin.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/js/coinbin.js b/js/coinbin.js index 84514d8..3443efa 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -822,21 +822,27 @@ $(document).ready(function() { var tempX = 0; var tempY = 0; if (IE) { // If browser is IE - tempX = event.clientX + document.body.scrollLeft; - tempY = event.clientY + document.body.scrollTop; + tempX = event.clientX + document.body.scrollLeft; + tempY = event.clientY + document.body.scrollTop; } else { - tempX = e.pageX; - tempY = e.pageY; + tempX = e.pageX; + tempY = e.pageY; }; + if (tempX < 0){tempX = 0}; if (tempY < 0){tempY = 0}; var xEnt = Crypto.util.bytesToHex([tempX]).slice(-2); var yEnt = Crypto.util.bytesToHex([tempY]).slice(-2); var addEnt = xEnt.concat(yEnt); + if ($("#entropybucket").html().indexOf(xEnt) == -1 && $("#entropybucket").html().indexOf(yEnt) == -1) { $("#entropybucket").html(addEnt + $("#entropybucket").html()); }; - if ($("#entropybucket").html().length > 128) {$("#entropybucket").html($("#entropybucket").html().slice(0, 128))}; + + if ($("#entropybucket").html().length > 128) { + $("#entropybucket").html($("#entropybucket").html().slice(0, 128)) + }; + return true; }; });