MichaelHoward comments on Reforming rot13 - Less Wrong

2 Post author: DanielVarga 04 November 2011 11:41PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (35)

You are viewing a single comment's thread.

Comment author: MichaelHoward 05 November 2011 01:46:15PM *  0 points [-]

Instead of the receiver pasting the ciphertext into the rot13.com textbox...

Make an easy-to-get-to bookmark in your browser, and paste this into where you'd normally put the link to the web site:

javascript:inText=window.getSelection()+'';if(inText=='')%7Bvoid(inText=prompt('Phrase...',''))%7D;if(!inText)%7BoutText='No%20text%20selected'%7Delse%7BoutText='';for(i=0;i%3CinText.length;i++)%7Bt=inText.charCodeAt(i);if((t%3E64&&t%3C78)%7C%7C(t%3E96&&t%3C110))%7Bt+=13%7Delse%7Bif((t%3E77&&t%3C91)%7C%7C(t%3E109&&t%3C123))%7Bt-=13%7D%7DoutText+=String.fromCharCode(t)%7D%7Dalert(outText)

Now, select the text you want to rot13 and click this bookmark.

I can't remember where I got this from, it's been in my browser for ages.

[Edit: someone added a different one below, so I guess you have a backup if either doesn't work on your browser].

Comment author: dbaupp 05 November 2011 01:55:01PM 1 point [-]

This is an improved version of that bookmarklet.