Bookmarklets: empower your webbrowser
Posted by jpluimers on 2010/06/02
Next to Greasemonkey – the script engine that empowers FireFox and Chrome, there is another very powerful way to enhance your browser:
Bookmarklets.
Bookmarklets are like shortcuts, but they don’t point to a static URL: they add action, usually by some JavaScript.
If the bookmarklet returns a string, then the browser will follow that as a URL.
But the since bookmarklet has access to the current page, it can also perform just a local action.
The cool thing is that most bookmarklets work on almost any popular browser.
These are a few bookmarklets that I use on a regular base, most are from bookmarklets.com:
- Press This for WordPress
- Twitlet for Twitter**
- Extract URLs (sourcecode is below, as WordPress does not allow the JavaScript as part of a URL)
- List Email Links and List all Links (at the moment of writing: the second and third one on the page)
- Duplicate Page (4th bookmarklet on the page)
- Up a Directory (6th bookmarklet on the page)
- Google Books Extractor (extracts pages as images from Google books so you can store them off-line for later reference)
- Some of the Design Bookmarklets
Content of the Extract URLs bookmarklet shortcut; drag the complete text to your favourites bar to activate it:
javascript:var a='';for(var ln=0;ln<document.links. length;ln++){var lk= document.links[ln];a+=ln+': <a>'+ lk+'</a>\n';}w= window.open('','Links',' scrollbars,resizable,width= 400,height=600');w.document. write(a)
Note that if you are going to write bookmarklets yourself, you need to watch the naming of your variables so they don’t collide with names already in use.
A quick note on Twitlet security from their FAQ:
Is it secure?
Yes and No.
Twitlet is storing your username and password in the bookmarklet code on your browser for fast and simple updating.
This means if other people have access to your computer they can send messages to your Twitter account.
Your username and password are encrypted to ensure that even if someone sees your bookmarklet’s source code, she can’t easily remember or guess it.
Obviously that wont be that hard for a person to decode it (with enough experience in cryptology.)
So you should only use it at your own risk.
Leave a Reply