Main Page | See live article | Alphabetical index

Bookmarklet

A bookmarklet is a small cross-platform JavaScript program that can be contained as URLs within the bookmarks of most popular web browsers, or within hyperlinks on a web page. Because Microsoft Internet Explorer uses the term Favorites instead of bookmarks, bookmarklets are also less commonly called favelets.

Bookmarklets can be saved and used like normal web page bookmarks. Therefore, they are simple "one-click" tools that can add substantial functionality to the browser. For example, they can

The first bookmarklets were named and created by Steve Kangas of www.bookmarklets.com, based on an idea suggested in the Netscape JavaScript Guide.

For example, the following bookmarklet will search Wikipedia for the string currently highlighted in the browser. If nothing is selected, it will display a dialog box form field in which to enter a search string.

javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Keywords...',''))};if(Qr)location.href='http://en.wikipedia.org/w/wiki.phtml?search='+escape(Qr)

External links