Roll Your Own Custom Bookmarklets In Firefox, part 2 - page 2

Javascript Bookmarklets

October 23, 2008

By
Akkana Peck

What, you say you don't particularly need a bookmarklet that turns
text green? Okay, me neither. But you can use javascript:
for all sorts of really useful things.

Ever wonder who links to your pages? There's a Google query term
for finding "back refs" (it's link:), but who remembers
all the special Google query terms?
Instead, just bookmark this handy Javascript expression:

Here's a short but sweet one. Did you know that web servers give
an idea of when a page was last modified? You can get that information
with a last-modified
bookmarklet:
javascript:alert(document.lastModified)

Some of the useful Javascript bookmarklets get a bit long, and
they're not very readable. So for the rest of the bookmarklets
in this article I'll simply provide the link. To try one,
or paste it as a bookmark, right-click on the link and choose
"Copy Link Location".

Remember the Wikipedia search bookmarklet in the last article? You
can make it even more powerful by adding some Javascript to search for
words selected in the current page:
Look
up selected words in Wikipedia.

Here's a bookmarklet that translates a page from another language using
Babelfish, provided you know the appropriate two-letter code:
Babelfish translate.

A frequently requested feature for Firefox is a button to go up one
level from the current page. But you don't need a button
if you just make a bookmarklet:
Up one level.