Entry tags:
stupid javascript tricks
Prompted inadvertently by ajd, a javascript currency conversion bookmark (works in Mozilla, no guarantees for anyone else): Convert Me, Baby! As it stands, it defaults to converting 1 unit of the source currency to USD.
Update: lj doesn't like it as it stands. here's what the URL looks like: javascript:frm=prompt('source currency');amt=prompt('amount');to=prompt('dest currency');if(!amt)amt=1;if(!to)to='USD';location.href='http://finance.yahoo.com/m5?a='+amt+'&s='+frm+'&t='+to
Update: lj doesn't like it as it stands. here's what the URL looks like: javascript:frm=prompt('source currency');amt=prompt('amount');to=prompt('dest currency');if(!amt)amt=1;if(!to)to='USD';location.href='http://finance.yahoo.com/m5?a='+amt+'&s='+frm+'&t='+to

no subject
javascript:frm=prompt('source%20currency');amt=prompt('amount');to=prompt('dest%20currency');if(!amt)amt=1;if(!to)to='USD';location.href='http://www.xe.com/ucc/convert.cgi?From='+frm+'&To='+to+'&Amount='+amt;Quicksilver caches Safari bookmarks, so OS X users can request a currency conversion regardless of the foreground app. I like this.
I prefer oanda.com to Yahoo or XE - they'll not only provide currency conversion, but block value tables and calculate in trader fees - but their URL handling is too fussy for my weak javascript skillz.
no subject