A Bookmarklet to View Bookmarklets

If you want to dive right in, here is the bookmarklet.

Why would anyone want this bookmarklet?

Mobile Safari in iOS only lets the user bookmark pages that have been loaded. This means that there is no direct way to save a bookmarklet in Mobile Safari since bookmarklets never actually load—they just run in the context of the current page instead of loading as a separate page.

The normal way to add a bookmarklet to Mobile Safari is to save the bookmarklet with a desktop version of Safari and sync it to Mobile Safari. There is, however, an indirect way to add bookmarklets using only Mobile Safari:

  1. Save a normal bookmark to a normal page (any page).
  2. Locate the code for the desired bookmarklet and copy it (tap and hold to select the "source code", then tap Copy).
    This is the hard part since the source code for most bookmarklets is never directly displayed (the bookmarklet offered on this page was created to work around this problem).
  3. Edit the bookmark created in step #1:
    1. Tap and hold on the URL. Lift your tap once the positioning magnifier shows up.
    2. Tap Select All in the selection pop up menu.
    3. Tap Paste in the selection pop up menu.
    4. Rename the bookmark to reflect the function of the bookmarklet.
      Also (for iPads), you might want to put the bookmarklet in the special Bookmarks Bar folder so that it appears when you tap on the main URL bar.

The first two steps (create a bookmark, copy bookmarklet code) can be done in any order.

How do I use this bookmarklet?

The bookmarklet from this page will modify all bookmarklets on your current page so that they display their code instead of running that code. Once you have it installed as a bookmarklet, you can use it on other pages to install bookmarklets that are otherwise not directly installable (in Mobile Safari).

When a modified bookmarklet is triggered, the whole page is overlaid with a temporary "code display". It will look something like this:

Tap to disable.
Tap outside to return.

While the code is displayed, you may:

How do I install this bookmarklet?

Use the bookmarklet link on this page to reveal its own source code.

  1. Tap it once to enable the viewing functionality.
  2. Tap it again to actually view its source code.
  3. Use the workaround bookmarklet installation procedure to install this bookmarklet.
  4. Use it on any other page with bookmarklets.