JavaScript Bookmarklets

Annika Backstrom
in misc, on 6 October 2008. It is tagged #Web and #bookmarklet.

I wrote my first bookmarklet as a proof-of-concept the other day. I often find myself shortcutting up to the location bar to switch between development and production web servers. Here's a bookmarklet that toggles "dev" and "www" subdomains for me, broken into a few lines for readability:


And in its ready-to-drag-to-your-bookmark-bar version: switch.