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; }; });