Created
January 6, 2019 14:07
-
-
Save jjhesk/0ed1f0afb62882007605149aa84e2f9e to your computer and use it in GitHub Desktop.
jschecker.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function check(event) { | |
var randomize = document.getElementById('randomize').value; | |
// var pattern = /"(.+?)" "(.+?)" "(.+?)" "(.+?)"/; | |
var ss, ssh, cs, nb, sn; | |
clear(); | |
if (randomize.length > 64) { | |
ss = String(randomize).substring(-8,0); | |
ssh = hex2a(ss); | |
cs = ssh / 100000; | |
println(cs); | |
} | |
} | |
function hex2a(hexx) { | |
var hex = hexx.toString();//force conversion | |
var str = ''; | |
for (var i = 0; (i < hex.length && hex.substr(i, 2) !== '00'); i += 2) | |
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); | |
return str; | |
} | |
function clear() { | |
results.innerHTML = ''; | |
} | |
function println(s) { | |
results.innerHTML += s + '<br/>'; | |
} | |
var results = document.getElementById('results'); | |
document.getElementById('verify').addEventListener('click', check); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment