Change the left_domain_name
and right_domain_name
variables to reflect your project. If your sites have exactly matching URL schemas (where localhost/my/path is always equivalent to production.com/my/path), you can ignore that big comment block. If not, check it out and rewrite the two functions to fit your setup.
Compress the javascript, say with UglifyJS.
Urlencode the result, say with this tool.
Add javascript:
to the front and save it as a bookmark. Depending on your browser, the easiest way to do this might be to make a new bookmark for a random page and then edit both the address and name.
Nice! Use my bookmarkleter for one-step bookmarkletification:
http://chriszarate.github.io/bookmarkleter/