At work it is often necessary for us to swap subdomains to go between working copies, QA and production. So to make this a little easier I've made a simple bookmarklet to do the work for me. Just bookmark the link below to see this in action.

This one is hardcoded to swap the subdomain to "dev".

Subdomain Bookmarklet

Here is one that prompts for the subdomain

Subdomain Bookmarklet