It’s occassionally useful to have the ability to apply the Rot13 algorithm to a block of text on a web page. Well, luckily because you can use javascript bookmarks in Mozilla you can. There are two simple ways to get this functionality either drag and drop this link onto your browser toolbar or paste the following hunk of javascript code into a bookmark:
javascript: var t = window.getSelection().toString();
window.getSelection().getRangeAt(0).deleteContents();
for (var s = '',i=0;i<t.length;i++) {
c = t.charCodeAt(i);
if ((c >= 97 && c <= 109) || (c >= 65 && c <= 77))
s += String.fromCharCode(c+13);
else if ((c >= 110 && c <= 122) || (c >= 78 && c <= 90))
s += String.fromCharCode(c-13);
else s += String.fromCharCode(c);
}
window.getSelection().getRangeAt(0).insertNode(document.createTextNode(s));