clean up the some of code formatting

This commit is contained in:
OutCast3k 2014-12-31 19:18:51 +00:00
parent 2660da29e9
commit 432d828af1

View file

@ -822,21 +822,27 @@ $(document).ready(function() {
var tempX = 0; var tempX = 0;
var tempY = 0; var tempY = 0;
if (IE) { // If browser is IE if (IE) { // If browser is IE
tempX = event.clientX + document.body.scrollLeft; tempX = event.clientX + document.body.scrollLeft;
tempY = event.clientY + document.body.scrollTop; tempY = event.clientY + document.body.scrollTop;
} else { } else {
tempX = e.pageX; tempX = e.pageX;
tempY = e.pageY; tempY = e.pageY;
}; };
if (tempX < 0){tempX = 0}; if (tempX < 0){tempX = 0};
if (tempY < 0){tempY = 0}; if (tempY < 0){tempY = 0};
var xEnt = Crypto.util.bytesToHex([tempX]).slice(-2); var xEnt = Crypto.util.bytesToHex([tempX]).slice(-2);
var yEnt = Crypto.util.bytesToHex([tempY]).slice(-2); var yEnt = Crypto.util.bytesToHex([tempY]).slice(-2);
var addEnt = xEnt.concat(yEnt); var addEnt = xEnt.concat(yEnt);
if ($("#entropybucket").html().indexOf(xEnt) == -1 && $("#entropybucket").html().indexOf(yEnt) == -1) { if ($("#entropybucket").html().indexOf(xEnt) == -1 && $("#entropybucket").html().indexOf(yEnt) == -1) {
$("#entropybucket").html(addEnt + $("#entropybucket").html()); $("#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; return true;
}; };
}); });