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

Frequently Asked Questions

Can you make an "open all links in tabs" bookmarklet?

Bookmarklets can't control whether they open windows or tabs, but you can. In Firefox 1.0, go to about:config to set browser.tabs.showSingleWindowModePrefs to true, then go to Tools > Options > Advanced > Tabbed Browsing to set "Force links that open new windows to open in: a new tab".

If bug 138198 were fixed, you would be able to middle-click the open all links bookmarklet to make it open in tabs or shift+click it to make it open in windows.

How can I convert bookmarklets to a more readable form (not all on one line)?

Firefox has a built-in feature for pretty-printing functions. You can use this feature, along with the JavaScript Shell, to pretty-print most bookmarklets. Using Firefox, copy the bookmarklet and paste it into the JavaScript shell. Before pressing Enter, make the small changes necessary so that the code evaluates to a function rather than executing the bookmarklet code:

To convert a pretty-printed bookmarklet back to single-line form, use the Brainjar JavaScript Crunchinator or something similar. Be warned that the JavaScript Crunchinator screws up in some situations, such as when the regular expressions contain spaces or comments contain single-quotes, because it does not attempt to tokenize JavaScript correctly.

How can I combine two bookmarklets?

Append everything after javascript: from the second bookmarklet to the first bookmarklet.

What can and can't bookmarklets do?

Bookmarklets can do what web pages can do, and nothing else. When you click a bookmarklet, the browser executes the JavaScript code as if it's a part of the page.

How can I run a bookmarklet on a mail or newsgroup message?

1. Outlook Express and any browser: Drag the message to the desktop, then drag the message from the desktop to a browser window or to the desktop icon that starts the browser. (This method doesn't work in Firefox.)

2. Outlook Express and Internet Explorer: Copy the message body to the clipboard, paste into an editable page. (This method doesn't work in Firefox.)

3. Any newsgroup message: use Google Groups instead of special newsgroup software.

Are there Firefox extensions for doing things with bookmarklets?

I'm not aware of extensions for doing any of the following:

Many bookmarklets don't work in Internet Explorer 6.

Microsoft reduces Internet Explorer's support for bookmarklets with every new version of Internet Explorer. IE5 supported bookmarklets up to 2083 characters. IE6 limits bookmarklets to 508 characters. IE6 SP2 keeps the 508-character limit and also counts each space as multiple characters.

Switch to Firefox or Opera :)

Many bookmarklets don't work when I block pop-up ads in Internet Explorer.

Most pop-up blocking designed to work with Internet Explorer, such as the Google Toolbar, only allows web pages to open windows within milliseconds of a click. Some pop-up blocking software doesn't even count a click on a bookmarklet as a click. The pop-up blocking built into Firefox and Opera get it right: they always allow web pages to open windows in response to a click on a link or button.

How can I put bookmarklets in Internet Explorer's right-click (context) menu?

I haven't really looked into this, but you might find these pages helpful: 1 2 3

© 2000-2007 Jesse Ruderman ( Feedback is welcome.
Last modified November 16, 2004.