"Javascript bookmarklets have been around since the early days of Javascript. They're possible because Firefox and most other modern browsers (except Konqueror) offer the special protocol "javascript:" to let you execute bits of javascript code directly.
"For instance, try typing this into Firefox's URL bar:
"javascript:alert('Hello, world!')
"You've just executed some javascript code (Figure 1), of the sort you might include in a web page. But since it's packaged as a URL, you can bookmark it. That's a Javascript bookmarklet."