Bookmarklets Home | Links | Forms | Text and Data | Zap | Web Development | Validation | Misc

Keyword Bookmarklets for Scripters

Mozilla has a feature called Custom Keywords that lets you assign keywords to bookmarks. To assign a keyword, right-click a bookmark and select Properties. To use a keyword bookmarklet, type the keyword into the address bar.

A less well-known feature is that if the URL of a keyword bookmark contains %s, the %s is replaced by whatever you type after the keyword. The most common use of %s keyword bookmarks is for searches (e.g. http://www.google.com/search?q=%s).

grayrest came up with the idea of keyword bookmarklets. Here are some more. After bookmarking these, assign them keywords (right-click, properties). To use them, type (for example) "ja document.body" into your address bar.

Browser bugs you might encounter:

(To keep bookmarklets in order to use them on other web pages, drag them to your Bookmarks Toolbar. Or, install them all at once.)

Bookmarklet Description Works in
j (statement) Executes the statement. Quiet unless an error occurs. Details Moz
ja (expression) Evaluates the %s expression and alerts the result. Details Moz
jb (node) Makes the node blink a few times. Details Moz
jp (object) Lists the properties and member functions of the object. Details Moz
jcs (node) Displays the differences in computed style between the node and its parent. Details Moz

Browsers: IE is Internet Explorer for Windows, Moz is Netscape 7 or Mozilla, NS4 is Netscape 4, and Op7 is Opera.


Details

j (statement) (Moz)

Executes the statement. Quiet unless an error occurs.

ja (expression) (Moz)

Evaluates the %s expression and alerts the result.

jb (node) (Moz)

Makes the node blink a few times.

jp (object) (Moz)

Lists the properties and member functions of the object.

jcs (node) (Moz)

Displays the differences in computed style between the node and its parent.

Example: "jcs document.body"


© 2000-2007 Jesse Ruderman (jruderman@gmail.com). Feedback is welcome.
Last modified December 6, 2004.