Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function heidiDecode(hex) {
  2. var str = '';
  3. var shift = parseInt(hex.substr(-1));
  4. hex = hex.substr(0, hex.length - 1);
  5. for (var i = 0; i < hex.length; i += 2)
  6. str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
  7. return str;
  8. }
  9.  
  10. console.log(heidiDecode('71786675786E782D484075393'));
  11.  
  12. var isBrowser=new Function("try {return this===window;}catch(e){ return false;}");
  13.  
  14. if (isBrowser()) {
  15. document.write(heidiDecode('71786675786E782D484075393'));
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement