1. What is a bookmarklet?
2. How to use a bookmarklet?
The only problem to use a smart bookmark is the raw access to the address bar of a link. Many browsers have lots of fancy interfaces but just one hidden interface for entering the address directly.
In firefox it is the right click on the bookmark bar or an Odyssey through the bookmark menu
3. How can I program a bookmarklet?
- you have access to the current page (or if somebody drops a page on the bookmarklet to this page)
- but sadly not sleep (use setTimeout instead)
- you can define functions (with names) in other functions (including lambda functions)
- you can use just one single line delimited by ;
For example my converter (; aren’t set on line breaks;this means you need to set them manually):
- You can test your scripts before converting or squashing on one line in mozilla scratchpad (firefox->scratchpad (DE: Notizblock)
ok, now a little example:
now a bit more complicate script which doesn’t change the address bar
and in the end a timeout driven function
squashed to one line: