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

Text and Data Bookmarklets

These bookmarklets let you use the text and other content of a web page in new ways.

(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
highlight Highlights each occurrence of a search phrase. Details Moz Op7
highlight regexp Highlights each match for a regular expression. Details Moz Op7
zoom images in Doubles the size of each image on the page. Details IE Moz Op7
zoom images out Halves the size of each image on the page. Details IE Moz Op7
zoom layout Increases the size of fixed-pixel-size layout elements and images. Details IE Moz Op7
view selection Displays the selection in a new window. Details IE Moz
sort table Lets you sort tables in a web page alphabetically. Details IE Moz Op7
number rows Numbers the rows of each table. Details IE Moz Op7
transpose tables Turns table rows into columns and vice versa. Details IE Moz Op7
bullets to numbers Turns bulleted lists into numbered lists. Details IE Moz Op7
number lines Numbers lines in <pre> tags or plain-text documents. Details IE Moz
rot13 selection Replaces each letter in the selected text with its rot13 equivalent. Details Moz

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


Details

highlight (Moz, Op7)

Highlights each occurrence of a search phrase.

Only finds phrases that do not cross element boundaries. For example, it will find "Paul McGarry" and "search phrase" but not "by Paul" in the next paragraph.

Based on a partial implementation by Paul McGarry.

highlight regexp (Moz, Op7)

Highlights each match for a regular expression.

For help using regular expressions, see Sean Richardson's introduction or Netscape's reference.

Like "highlight", this bookmarklet does not find phrases that cross element boundaries.

zoom images in (IE, Moz, Op7)

Doubles the size of each image on the page.

Doesn't work on background images or image submit buttons, and doesn't affect the size of text.

Suggested by Niels Aufbau.

zoom images out (IE, Moz, Op7)

Halves the size of each image on the page.

zoom layout (IE, Moz, Op7)

Increases the size of fixed-pixel-size layout elements and images.

Multiplies the width and height attributes of each element by sqrt(2). Double-click the bookmarklet to multiply each by a factor of 2.

This bookmarklet only affects sites that use fixed layouts with widths and heights specified in pixels. It does not change percent values or values computed based on the size of contents. It does not affect sites that use CSS layouts (luckily, CSS layouts with fixed pixel values are rare). It does not affect text size; the purpose of the bookmarklet is to fix layout when the Text Zoom feature built into a browser doesn't agree with a site's fixed layout.

Suggested by Asa Dotzler, who would like to read Talking Points Memo and The Daily Howler but has a Dell Latitude laptop whose resolution is stuck at 1600x1200.

view selection (IE, Moz)

Displays the selection in a new window.

Copies the selection into a new window, preserving links, paragraphs, and images. Uses:

sort table (IE, Moz, Op7)

Lets you sort tables in a web page alphabetically.

Adds an row to the top of each table on the page with an "a" link and a "d" link in each column. You can then click on these links to sort the table ascending or descending by that column. The sort is alphabetical by HTML code, so if the table entries are links, the link URLs will be given higher precedence than the text of the links.

number rows (IE, Moz, Op7)

Numbers the rows of each table.

Useful on for sorted tables such as most frequently reported Mozilla bugs.

If a table has a header row, the bookmarklet does not give the header row a number but instead adds a header for the new row-number column with the text "Row".

transpose tables (IE, Moz, Op7)

Turns table rows into columns and vice versa.

Takes rowspans and colspans into account, and tries to maintain background colors.

bullets to numbers (IE, Moz, Op7)

Turns bulleted lists into numbered lists.

Useful for finding the "position" of your site in a dmoz category.

number lines (IE, Moz)

Numbers lines in <pre> tags or plain-text documents.

Hits a weird bug on plain-text documents in newer versions of Mozilla (bug number?).

rot13 selection (Moz)

Replaces each letter in the selected text with its rot13 equivalent.

For example, A becomes N, B becomes O, and O becomes B. Grey Hodge aka jesus_X wrote the rot13() function for this bookmarklet.

Bugs: The bookmarklet rot13s more than you have selected if you use the bookmarklet just after dragging a link. I think this is because I don't check range offsets for non-text endpoints. Mozilla forgets to redraw the entire selection if the bookmarklet is run from a page rather than the address bar, but text is still selected.


© 2000-2007 Jesse Ruderman (jruderman@gmail.com). Feedback is welcome.
Last modified November 1, 2006.