Skip to content

Instantly share code, notes, and snippets.

@qwIvan
Forked from hpainter/tncms_unscramble.js
Created February 15, 2016 04:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qwIvan/0fdedb8d26b05ec11d26 to your computer and use it in GitHub Desktop.
Save qwIvan/0fdedb8d26b05ec11d26 to your computer and use it in GitHub Desktop.
function (sInput){
var sOutput='';
for(var i=0,c=sInput.length;i<c;i++){
var nChar=sInput.charCodeAt(i);
if(nChar>=33&&nChar<=126){
sTmp=String.fromCharCode(33+(((nChar-33)+47)%94));
sOutput+=sTmp
}else{
sOutput+=sInput.charAt(i)
}
}
return sOutput
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment