This utility was suggested by
ryano at
Notelet Nodelet Utilities. Placing
the code below into your
notelet nodelet will
give you a button that will reverse text. You can feed text to this utility
through text selection, or if no text is selected, through a prompt.
Update 4/8/2003 at 2:33:42: Now you can copy the reversed text.
For Mozilla/Netscape
<button onclick="p=document.getSelection();
q='';if(''==p)p=prompt('Text...','');if(null!=p){
for(i=p.length;0<i;)q+=p.charAt(--i);prompt(q,q);}">
Reversify</button>
For Internet Explorer
<button onclick="p=document.selection.createRange().text;
q='';if(''==p)p=prompt('Text...','');if(null!=p){
for(i=p.length;0<i;)q+=p.charAt(--i);prompt(q,q);}">
Reversify</button>
Compatible with both browsers
<button onclick="q='';d=document;
p=d.all?d.selection.createRange().text:d.getSelection();
if(''==p)p=prompt('Text...','');if(null!=p)
{for(i=p.length;0<i;)q+=p.charAt(--i);prompt(q,q);}">
Reversify</button>