I found the following code to decode a ROT13 string and put it into a webpage with JavaScript:
<script type="text/javascript">
document.write("string".replace(/[a-zA-Z]/g,
function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
</script>
I need a similar JavaScript code to decode ROT47.
I found a few functions, but I have no idea how to get it into the same script, so it will put the decoded string into a webpage.
One of them is here – http://www.visualco.de/ROTn.js.html
Can someone please help?
Thanks a lot!
Simply copy the needed functions into your JavaScript. At the appropriate place, do
necessary functions: