Moxley Stratton

Code Blog

Bookmarklet Compiler

What are bookmarklets? They’re small Javascripts, saved as browser bookmarks, that perform useful functions. Here’s my favorite bookmarklet site. It includes the bookmarklet that helped me develop my first Ajax applications: Javascript Shell.

How do you make a bookmarklet?

  1. Write the javascript that you want to be the bookmarklet.
  2. Escape all the special URL characters, like space, parentheses, etc.
  3. Wrap the script in an anonymous Javascript function
  4. Wrap the function in a Javascript URL (javascript:...)
  5. Better yet, just do step #1 and use the bookmarklet maker below to do the rest.

Bookmarklet Maker

This form will take your nicely-formatted Javascript, and turn it into a URL so that you can bookmark it.

Go ahead and enter some javascript.

The Javascript function for creating the bookmarklet maker can be downloaded from Github