> Are those bookmarklets available anywhere online? If they aren't, and you're 
> happy to share them, I'll write a blog post on them - and credit you, of 
> course. Obviously no problem at all if you don't want to share the code.

I've been meaning to write it up myself, not that it's such a special technique 
or super cool code or anything, just that it's pretty useful. But, alas, as 
always, I have no time.

This is one I use to switch from dev to prod (edited the real URLs for security 
- hopefully you can get them working for you):

javascript://%0Aif(/dev\./.test(location.href)){location.href=location.href.replace('dev.','www.');};

Here's another one I hacked together to go from QA to my dev environment for 
the theme branch:

javascript://%0Aif(/qa\.example\.com/.test(location.href)){location.href=location.href.replace('qa.example.com/','dev.example.com/~USER/BRANCH/?q=');};

Credit goes to poetro for suggesting the use of regex literal.

psynaptic
http://twitter.com/psynaptic
http://drupalcontrib.org/

Reply via email to