kpreid comments on Open Thread: February 2010, part 2 - Less Wrong

10 Post author: CronoDAS 16 February 2010 08:29AM

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

Comments (857)

You are viewing a single comment's thread. Show more comments above.

Comment author: kpreid 19 February 2010 11:06:31PM *  7 points [-]

I use this “bookmarklet”:

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)

[Not written by me; I have no record of where I obtained it.]

Put it in your bookmarks bar in most web browsers, and when you click it it will display the rot13 of the selected text, or prompt you for text if there isn't any selection. In Safari the first entries in the bookmarks bar get shortcuts ⌘1, ⌘2, ..., so it ends up that to rot13 something on a web page I just need to select it and press ⌘3.

Comment author: dclayh 19 February 2010 11:28:13PM 0 points [-]

Excellent, thank you.