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:
- Save a normal bookmark to a normal page (any page).
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).
- Edit the bookmark created in step #1:
- Tap and hold on the URL. Lift your tap once the
positioning magnifier shows up.
- Tap Select All in the selection pop up menu.
- Tap Paste in the selection pop up menu.
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:
While the code is displayed, you may:
- select and Copy it (to make save a bookmarklet in Mobile
Safari), or
- tap anywhere outside the main box to return to the
original page, or
- tap on the "disable" link inside the main box to disable
bookmarklet viewing (i.e. make tapping on a bookmarklet run
its code, like normal).
How do I install this bookmarklet?
Use the bookmarklet link on this page to
reveal its own source code.
- Tap it once to enable the viewing functionality.
- Tap it again to actually view its source code.
- Use the workaround bookmarklet
installation procedure to install this bookmarklet.
- Use it on any other page with bookmarklets.