Anthony's Java Bookmarklet
Show my Bookmarks
Show bookmarklet pageBlog Bookmarklets
Bookmarklets
From IRT.org
Bookmarklets are simple tools that extend the surf and search capabilities of Netscape and Explorer web browsers.
Steve Kangas - "Chief of Rocket Science" - Bookmarklets.com
Introduction
Here is something novel: using JavaScript to make your web experience more enjoyable, when you decide, and with what you want to do - rather than site specific JavaScript code that performs what the web author wants to do.
Wherever you browse the WWW, the chances are you'll come across a site that does something you don't like: opens new windows, displays white text on a black ground, etc. Until you've visited the site, you'll not know what it is that you'll not like. And once you've visited, its too late to change anything.
Wouldn't it be nice to actually alter the look of a site, extract data from a page, search the web and navigate in new ways?
This is where JavaScript Bookmarklets come in. The Bookmarklets.com web site run by Steve Kangas, uses a JavaScript feature not often demonstrated. Since the introduction of Netscape Navigator 3.x and Microsoft Internet Explorer 4.x, it has been possible to use a JavaScript URL in the form javascript:code in the location bar on all platforms: Windows, Mac, Unix etc.
If you are using one of the appropriate browsers, why not type the following into the location bar right now:
javascript:alert('Hello World') |
If you are using one of the appropriate browsers, and have JavaScript enabled, then you should see a JavaScript alert window with the words "Hello World". Notice how the location of the current document is not changed. This allows us to invoke JavaScript code on the current document without changing the documents location, and without requiring special access privileges to the documents site.
For example, to find out the current documents title, we can use the following JavaScript URL:
javascript:alert(document.title) |
Which should display "JavaScript Bookmarklets".
Making bookmarklets
If you regularly visit a particular web site, that, say, has a bad choice of background color. Perhaps you find it hard to read the text. Wouldn't it be great to be able to change the background color with out too much hassle? Well the following JavaScript URL would change the background color of the current document to white:
javascript:void(document.bgColor='#FFFFFF') |
However, after typing that out a few times, you might find yourself putting up with orange text on a red background. This is where the bookmarklet idea comes into its own.
Why not simply bookmark the JavaScript URL?
Indeed, why not? There is no reason not to. The JavaScript code, being part of the URL, will be safely stored in your bookmarks file. The JavaScript code cannot cause any problems (at worse it will simply generate an error message), it is small and effective, and it is only invoked when you choose the bookmark from your bookmark or favourites list.
But how do you bookmark a JavaScript URL? If you bookmark the effects of a typing in a JavaScript URL, then all you'll do is bookmark the current document.
This is simple. Just create a temporary page with the JavaScript URLs as complete hypertext links. For example:
<A HREF="javascript:void(document.bgColor='#FFFFFF')">White background</A> <A HREF="javascript:void(document.bgColor='#000000')">Black background</A> |
which looks like:
White background
Black background
and then just bookmark the above links:
- Netscape Navigator - Point at bookmarklet link. Press down (right) mouse button and choose "Add Bookmark".
- Microsoft Internet Explorer:
- Windows - Press down (right) mouse button and choose "Add to Favorites"
- Mac - Point at bookmarklet link. Hold down mouse button and choose "Add Link to Favorites"
For Netscape on the Mac and some Unix platforms, it may be necessary to rename the bookmarklet (since Add Bookmark lists the javascript URL as the name of the bookmark instead of the link text).
You'll now have two bookmarklets which can be used to alter the background color of any web page.
Unlike normal bookmarks, which include the documents title text, the bookmarked links use the link URL as the description of the bookmark, however, once bookmarked it is possible to manage/edit your bookmarks to give them a more user friendly description.
Why and when to use the void
The void operator discards the value of its operand and returns an undefined value. It is often used within links using the javascript: protocol to ignore the results of expressions. For example, when using the window objects open method, a reference is returned to the newly created window. This is usually used as a window handle. However, when used in a link, the returned window reference will cause the browser to display the returned result (normally '[object Window]') in the current window, thus overwriting the original contents. Using the void operator stops this from occuring:
<A HREF="javascript:void(window.open('about:blank', 'windowName', 'width=100,height=100'))">about:blank</A> |
Which produces:
Frame Compatibility
Bookmarklets act on the windows document, this means that if the window contains a frameset then there is a possibility that a bookmarklet will fail to achieve its objective, e.g. changing the background color, as it will attempt to change the background color of the window and not one of the framed documents. It just depends on what the bookmarklet is attempting to do. For example, a bookmarklet to place the URL of the window in the body of an email message would work perfectly:
<A HREF="javascript:location.href='mailto:?SUBJECT=' + document.title + '&BODY=' + escape(location.href)">Send Location</A>
Which produces:
It is possible to make bookmarklets compatible with frames - although you'll probably want one version for non framed pages, and another for framed pages - you just need to add frame navigation to your bookmarklets. For example, to change the background color of any frame within a frameset, you could add a prompt to confirm which frame you wish to change:
<A HREF="javascript:n=top.frames.length;if(n>0) {f=prompt('Which frame? [1-'+n+']','');if (f>n) {alert('Out of range!')} else {void(top.frames[f-1].document.bgColor='#FFFFFF')}} else {void(document.bgColor='#FFFFFF')}">White background</A> <A HREF="javascript:n=top.frames.length;if(n>0) {f=prompt('Which frame? [1-'+n+']','');if (f>n) {alert('Out of range!')} else {void(top.frames[f-1].document.bgColor='#000000')}} else {void(document.bgColor='#000000')}">Black background</A> |
Which produces:
White background [Frame compatible]
Black background [Frame compatible]
It's also possible to write a recursive script that descends through the frames. For an example, see the code for Page Freshness (Frames version) at http://www.bookmarklets.com/tools/frames.phtml#pgfrshfrm
Browser Compatibility
As you are no doubt aware, Microsoft and Netscape have different implementations of JavaScript and the Document Object Model, therefore it is possible to write bookmarklets that will work with one browser but not another.
It is also possible write bookmarlets that will only work correctly on the latest browser versions. For example, to get feel for how long a document is the following bookmarklet will calculate how many windows the current document fills:
<A HREF="javascript:alert('The document fills about ' + Math.round((document.height*document.width) / (innerHeight*innerWidth)) + ' windows (at current window size)')">Document size</A> |
Which produces:
As it stands it will only work in Netscape Navigator 4+, but another bookmarlet could be written for Microsoft Internet Explorer 4+:
<A HREF="javascript:alert('The document fills about ' + Math.round((document.body.clientHeight*document.body.clientWidth) / (document.body.offsetHeight*document.body.offsetWidth)) + ' windows (at current window size)')">Document size</A> |
Which produces:
You just bookmark the appropriate bookmarklet for your browser, although if you are adventurous, you could always create bookmarklets that handle both browers at once:
<A HREF="javascript:if (document.all) {alert('The document fills about ' + Math.round((document.body.clientHeight*document.body.clientWidth) / (document.body.offsetHeight*document.body.offsetWidth)) + ' windows (at current window size)')} else {alert('The document fills about ' + Math.round((document.height*document.width) / (innerHeight*innerWidth))+' windows (at current window size)')}">Document size</A> |
Which produces:
Document size (MSIE4+ and NN4)
Conclusion
As Steve himself says "the limit on the number of characters [in a bookmark] is difficult to answer", although "Netscape on Macintosh will not accept bookmarks longer than 507 characters, and may have trouble with bookmarks longer than 255 characters." Currently Steve uses a maximum of 256 characters for all the bookmarklets at Bookmarklets.com. Although he hopes to be able to extend this self imposed limit based on feedback received to 1000, 2000 and then perhaps 4000 characters.
This article has only been a short introduction into the use of bookmarklets. Bookmarklets can be used to scroll through a document, hide and display images, alter the text font and color (MSIE4+ only), manipulate selected regions of text in the document, examine and manipulate the links in a page, manipulate windows - they are limited only by your own imagination.
My personal favourite is the following simple bookmarklet that resizes the window to 640x480 pixels (so that I can check what a page looks like at a smaller resolution):
<A HREF="javascript:resizeTo(640,480)">Resize (640x480)</A> |
Which produces:
Simple, but extremely effective.
I would strongly suggest visiting the Bookmarklets.com web site run by Steve Kanga, as there are over 150 bookmarklets just waiting to be bookmarked.
Sourced from LucDesk
Bookmarklets are links, but they do not link to web pages, they link to a simple script. To keep a bookmarklet, just bookmark it or drag it to your links bar. (Please note: Not all bookmarklets work on all browsers.)
- Search Google
- Search Teoma
- Search AllTheWeb (Source: dooyoo-uk)
- Dictionary Lookup (Source: centricle)
- Thesaurus Lookup (synonyms and antonyms) (Source: centricle)
- Search TechEncyclopedia
- Find Articles
- List all links on page in new window
- Alexa Snapshot (Source: Woodster.com)
- Page Weight (Source: Woodster.com)
- Check Uptime (Netcraft) (Source: centricle)
Sourced from Woodster.com
Site Data
Netcraft...Alexa Snapshot...
Google Related...
Whois...
Cookie?
Validate Site
W3C HTML Validator...W3C CSS Validator...
Selected Text
Search Google...Define...
Thesarus...
Grab...
Manipulate Page
Grayscale the pageMissing ALT Tags
Loose CSS
Zoom +
Zoom -
Turn on Borders
Page Weight
Show DIVs
Page Freshness
Analyze Images
Page Weight & Speed...
View CSS...
View Scripts...
View Graphics...
Misc
ResizeNext Blog
Bookmarklets/Favelets that work in Safari from Andy Budd
Amazon Bookmarklets
- Amazon.com book search
- Amazon.com general search
- Amazon.co.uk book search
- Amazon.co.uk general search
General Web Surfing
- MT post
- Convert long URL to "tinyurl"
- Email URL
- AutoFill Anonymous
- Make form Get
- Bablefish bookmarklet
- Google Translate!
- Full Screen
Web Development
- W3C (X)HTML validator
- W3C CSS validator
- Beta Validate
- Fussy Parsing
- Toggle Linked CSS
- Bobby check A
- Bobby check AA
- Bobby check AAA
- Resize browser to 640x480
- Resize browser to 800x600
- Resize browser to 1024x768
- PHP Function
- Show divs with colour
- View Cookies
- Web Page Analyzer
SEO
Bookmarklets for Opera sourced from Phil Burns
Navigation
Open all Links in New Windows Opens all the links on the page in new windows and sends them to the background
Split Frames into Windows The windows will have the original frame size : from - bookmarklets.com.
Open Previous in New Window Only works if the Previous is in the same domain
Open Next in New Window Only works if the Next is in the same domain
from - Me.
Searching
Search this Domain. Very cool. Promts for a string, then does a Google advanced search in current domain.
Search ODP (New Window) from - ODP (dmoz.org) editors bookmarklets.
Search ODP in Background from - Phil Burns.
Search Hotbot (New Window) from - Rijk Van Geijtenbeek.
Links To this Page - AltaVista from - Rijk van Geijtenbeek.
Search for current page in www.archive.org from - Tobias Boyd.
Search google groups (New window) from - An opera.general poster I think
Checking Code Validity
Validate at WDG from - Rijk van Geijtenbeek.
Validate HTML at W3C from - Rijk van Geijtenbeek.
Validate HTML at W3C (In Background) from - Me :).
Validate all frames HTML W3C from - Me.
Validate CSS for page at W3C from - Phil Burns. Finally my own one :)
Validate CSS for page at W3C (In Background) from - Phil Burns. Another :)
Validate all frames CSS W3C from - Me.
Validate HTML & CSS at W3C (In Background) Opens two windows from - Phil Burns. Another :)
Page Data
Document Info Very nice... shows URL, hostname, the URLs of all frames (clickable), modification date, referrer, hash (both if provided only), lists all links and all images (both clickable), all in a new popup window. By - Roland Reck.
Document Info 2 Similar to the above but re-written by Roland for Opera 7
Read Cookie for Site from - bookmarklets.com I think.
Check Document Last Modified from - Maurizio Berti & Rijk van Geijtenbeek.
Who is from - Jesse Ruderman
Check site server from - Jesse Ruderman
Show HTTP headers from - Jesse Ruderman
Window widgets
Resize Window to 1024 x 768 Me.
Resize Window to 800 x 600 Me.
Resize Window to 640 x 480 Me.
Miscellaneous
Google Translate (English) from - Partially Correct
List Email Links from - bookmarklets.com
Number of Links from - bookmarklets.com
Go To Random Link from Page from - ODP (dmoz.org) editors bookmarklets.
List All Links on Page from - ODP (dmoz.org) editors bookmarklets.
Send Location This one may be of particular interest to those that want to send pages by email. from - ODP (dmoz.org) editors bookmarklets.
AutoFill Anonymous Fills out forms as anonymous.
from - ODP (dmoz.org) editors bookmarklets.
Bookmarklets Editor Creates a window to make and test your own bookmarklets in.
from - ODP (dmoz.org) editors bookmarklets.
Show All Images in New Window - Modified from bookmarklets.com
PAS Complaint - Send a complaint about a webpages code to all mailto links on a page ;-) from - Me
Bookmarklets from Centricle
- Ruler 1.2 (info)
- Show Specific Elements (info)
- Highlight Elements [MacIE] (info)
- Highlight Elements [Gecko/KHTML] (info)
- Google [selected] (info)
- Show IDs (info)
- User CSS (info)
- Maximize IE (info)
query web tools
There's nothing particularly innovative here, just some things I threw together for my own convenience. They simply query existing tools on the Web directly from the browser, so if you find them to be useful, drag to your browser's toolbar & enjoy.
They should all work in for IE 5 & up and Mozilla, on both Mac & Windows.
Search via Prompt:
- Search Google
- Search Google Groups
- Search Google Images
- Google Current Site
- Dictionary Lookup
- Thesaurus Lookup
- Search PHP.net
- Lookup PHP Function
- Search eBay
- Search OLGA
- Search IMDB
- Define Acronym
Search for Selected:
- Search Google
- Search Google Groups
- Search Google Images
- Google Current Site
- Dictionary Lookup
- Thesaurus Lookup
- Search PHP.net
- Lookup PHP Function
- Search eBay
- Search OLGA
- Search IMDB
- Define Acronym
Webdev Tools:
Dev Tools via Prompt:
Bookmarklets from Sean Willson
- search
- search with prompt
- tools
- check link on webpage
- check website uptime
- disable stylesheets
- resize browser 640x480 vga
- resize browser 800 x max screen height
- resize browser 800 x 600 svga
- resize browser 1024 x max screen height
- resize browser 1024 x 768 xga
- ruler 1.2 (on screen ruler)
- show image sizes
- show alt info
- tidy html
- validate html
- validate html in new window
- validate typed url
- validate typed url in new window
- validate css
- view http headers
- display webhost info
- babelfish - japanese to english
- babelfish - french to english
- babelfish - gernam to english
- babelfish - spanish to english
- babelfish - italian to english
Bookmarklets from Squarefree
- Link Bookmarklets: search links, linked images, etc.
- Form Bookmarklets: toggle checkboxes, enlarge textareas, view passwords, etc.
- Text and Data Bookmarklets: zoom images in, sort table, etc.
- Zap Bookmarklets: get rid of annoyances such as unreadable color combinations, Flash, and blind links.
- Web Development Bookmarklets: debug web pages and experiment with new code.
- Validation Bookmarklets: check how well the code of a web page is written.
- Miscellaneous Bookmarklets.
- Search Bookmarklets.
- Search Engine Optimization Bookmarklets: search for backlinks, analyze search engine positions.
- Log Analysis Bookmarklets: analyze referer logs efficiently.
- Flash Bookmarklets: pause, rewind, and fast-forward Flash cartoons.
- Tipping Bookmarklet: send money to an e-mail address in a page.
- Color Bookmarklets: change all colors on a page at once.
- Keyword Bookmarklets for Scripters: type "jb document.body" to make document.body blink, etc.
- Site-specific Bookmarklets: fix annoyances on some sites I read.
- Bugzilla Bookmarklets: for people involved in the Mozilla project or other projects that track bugs using Bugzillas.
- Testing browsers: test features or stress limits of browsers.
Bookmarklets from Tantek
Authoring
Multivalidator: HTML, CSS & HREFs all in one.
HTML
CSS
Screen sizes
Learning
CSS
HTTP
Scripts etc.
Reading
Translation
Enhanced User Interface
Bookmarklets from Malevolent Designs
zoom lens
(Internet Explorer 5.5 upwards required)
- 50% zoom
- 100% zoom (reset to default)
- 200% zoom
- Make 640px wide page fill browser
- Make 800px wide page fill browser
validation
accessibility
- Text-only browser (lynx-me)
- Total colourblindness (IE5 Win)
- Ultimate legibility test! (IE5 Win)
Bookmarklets from Dooyoo-uk
Count words in selected text Internet Explorer Only Version. Highlight some text on a page and then activate this bookmarklet to count the words in the selection. There are 8 words in this emphasised text.
List
all links on page in new window
As you'd expect, this opens a new, little window in which
are listed all the links on the page you are viewing when
you activate this bookmarklet. Clicking on any of the links
there will open that link in another new window
Open
selected url address (no http:// bit) IE
Only
This is a handy little bookmarklet that allows you to select
an address in text, where it hasn't actually been made as
a link (e.g. www.dooyoo.co.uk), and open it in a new window.
Just highlight the address, NOT including the http:// bit
if present, and select this bookmarklet from your favourites.
[Important Note: Where a url is written in full, including the http:// as in http://www.dooyoo.co.uk you would only highlight the bit I've coloured yellow in this example. It does not matter if you accidentally highlight an extra space at the end.]
Dooyoo
Web Search
This bookmarklet may be the most useful of all. This will
search the internet for any word(s) you highlighted, or any
words you enter in the 'prompt' box if you didn't highlight
any text. It makes searching online much faster and easier.
Search
Google
Activate this bookmarklet after highlighting words you want
to search for, or else enter your search words in the dialog
that appears, and a new window will open directly onto the
google.com search results. This can be an excellent tool
for spotting plagiarism, by highlighting a sentence and then
using this bookmarklet to search for matches.
Search
FAST / AllTheWeb
Activate this bookmarklet after highlighting words you want
to search for, or else enter your search words in the dialog
that appears, and a new window will open directly onto the
FAST / alltheweb.com search results.
Search
AltaVista
Activate this bookmarklet after highlighting words you want
to search for, or else enter your search words in the dialog
that appears, and a new window will open directly onto the
Altavista.co.uk search results.
Find
Related Pages indexed in Google
This uses that great "what's related" search feature in Google
to look up pages related to the one you are viewing when you
use the bookmarklet.
Bookmarklets from Accessify
Highlight some text on your web page (or perhaps some text that you are entering into a
<textarea>
, for example a Blogger or
MovableType post), then run this favelet - the highlighted text will be
passed through the Acrobot,
converting all your acronyms and abbreviations. Please note: this has
been tested in IE5
and IE6 on Windows
but does not always appear to work with <textarea>
s
in Mozilla (although any other text highlighted on the page does work
OK). [Thanks to Matt for providing!]
When designing a web page, you will often use ids in
<div>
tags to enable precise positioning using Cascading Style Sheets. This
favelet highlights ALL <div> tags with a red border and labels each
one with an id. Exactly as above, but this time only
<div>
s that have
a class are labelled. Not quite sure about how you might use this - we have yet to read up on this document property (document.compatMode). Only works for Internet Explorer.
[suggested by Jeff Rhodes at the Internet Association Corporation]
Displays all images on the page, alongside their alt attributes - useful for checking that alt attributes match up with image.
Displays all images on the page that do not have any alt attributes - useful accessibility checking tool. Remember, an image such as a spacer gif or an image used as decoration (such as a lined pattern) should use alt=" " (with a space between quotes).
Does exactly what it says on the tin ...
Does exactly what it says on the tin (assuming you've just used the 'disable stylesheets' favelet) ...
[suggested by Heather James]
Highlights table headings (yellow text on black background) - use this to see if table headings really are <th> tags or whether plain old <td>s were used instead.
Displays a list of all images on the page, excluding invisible spacer pixels. Also shows the file size for each image alongside the image
Shows all links on the page and the contents of the link (text and/or images). Also shows title attributes of each link (if present - very useful for assessing how accessible your links are.
Shows the style rules, as parsed by the browser, in a new window.
Highlights links on the page in glorious garish lime
Import all these favelets in one go
Other favelets
Highlights table cells - changes border colour, background/text colour and adds padding to cell contents.
Highlights all <div> tags on the page with a 2-pixel red border.
General page statistics, including when the page was last updated, what forms and styleSheets are linked, how many images, how many links and so on.
Displays all form attributes, for every form on a page - useful debugging tool.
Shows all meta tag data for the page (in case you are unable to view source, or source code is messy!)
Lists page dependencies, including external script files (.js), external style sheets (.css) and images. Please note: this script is over the 508 character limit and may not work on all browsers.
Dead simple - just places a solid black border around any table in the current document (but not cells within the table)
Bookmarklets from Pixy
My Favorite Favelets
Checking the Code
Following favelets send the displayed document to another website which will proccess it (in new window).
- W3C validator - validate (X)HTML code of displayed document
- WDG validator - validate (X)HTML code of displayed document
- W3C CSS validator - validate CSS code attached to displayed document
- Get content size (holovaty.com)
- LynxView of the document (by pixy)
- Simple DOM inspector of the document NEW (by pixy)
Styles and Stylesheets
- Toggle (activate/deactivate) document's stylesheets (by Tantek Çelik)
- Show style sheets content (will open new window[s]) (by Tantek Çelik)
- Show style rules (will open new window[s]) (by Tantek Çelik)
- Choose style sheet (if document contains alternate stylesheets) (by Tantek Çelik)
- List computed (cascaded) styles [old] (by pixy)
- List computed (cascaded) styles [NEW] (by pixy). Works in IE6/Win, IE5/Mac, and Mozilla. Write down name of property to be listed and move cursor over active document. Several browsers use CSS-names, other ones use DOM-names. See the predefined font size property: if you see "font-size", use CSS-names ("font-family", "margin-left", "border-style-left" etc.), if you see "fontSize", you have to use DOM-names ("fontFamily", "marginLeft", "borderStyleLeft" etc.).
Page Design
Following favelets can change only properties of the document. Style of its elements may be set by CSS. You may use a stylesheet switching (see above) before applying these favelets.
- Set background color (with prompt) (by bookmarklets.com)
- Set background to white
- Clear background (removes bgImage, too)
- Set text color (with prompt) (by bookmarklets.com)
- Hilite all links (IE4+) (by bookmarklets.com)
- Toggle all underlines (IE4+) (by bookmarklets.com)
Page Info
- View HTPP headers (in new window)
- View HTPP transaction
- Page freshnes (date/time of last modification) (by bookmarklets.com)
- Number of links (by bookmarklets.com)
- List all links (by bookmarklets.com)
- List e-mail links (by bookmarklets.com)
- List all images (by bookmarklets.com)
- View all scripts (by Tantek Çelik)
Browser Window
To let these favelets work, the javascript moving/resizing of windows mustn't be disabled in your browser.
Bookmarklets from Stilleye
- Dynamic Source
- Image Grabber
- Want to steal an image? This image grabber will collect all images from a page for your convenience. Note: It won't collect background images in the HTML or through CSS.
- Disable Stylesheets
- How does the structured document look? Now you can see a site without stylesheets.
- JavaScript Console NS4/IE/Moz
- Ever feel like playing with your favorite website? Now you can. This little console allows you to run code. Have fun kids.
- View Scripts & Stylesheets IE/Moz
- This is probably one of the handiest bookmarklets I've seen. Quick access to all the scripts and stylesheets included on a page. This one is rewritten from the 13th Parallel's bookmarklet. It has been encapsulated to avoid conflicting with page variables.
- View Cookies NS4/IE/Moz
- Ever wonder what cookies sites are setting for you? Now you can see. Also great for use during the dev process.
- View Sourcer NS4/IE/Moz
- This bookmarklet will show the source of documents. If it is a single page, you just get the source. If it is a framed site, you'll get a list of links to the source of all the framed pages.
- URL From String IE/Moz
- If a URL appears on a page that isn't a hyperlink (usually happens in forums and newsgroups), just select the text you want and turn it into a URL! Test it here: http://www.yahoo.com/.
Bookmarklets from Sam-i-am
Web Page Debugging and Development Bookmarklets
Bookmarklets from 508 compliant
Accessibility
Accessibility
Bookmarklets from About.com
Resize Window Google Links Right Click Show CookiesBookmarklets from blog of francois
Google search on highlighted word; brings up Search prompt otherwise. Sometimes local scripts on a page prevent it from working. For more functionality, install the Google toolbar, or even better, Dave's Quick Search Taskbar Toolbar Deskbar (unreservedly recommended).
Source: Google
Resize browser window to 800×600 pixels, at the time of writing still the “average” screen resolution benchmark. (Note that you should subtract 20px if you want to take into account the size of the Windows Taskbar, a given on the majority of home computers.)
Source: favelets.com
Google search on highlighted word; brings up Search prompt otherwise. Restricts search to the current site.
Source: centricle.com
Generates a short URL pointing to the current page, placing it on the clipboard automatically, ready for pasting (Windows only). Useful with long, messy URLs that'll wrap when pasted into plaintext emails. My favourite over the other three alternatives, Makeashorterlink, Notlong and SnipURL. (The latter lets you customise the shortened URL.)
Source: TinyURL.com
Removes java, flash, background music, and third-party iframes. Excellent for intrusive Flash ads. I prefer using this rather than a blanket ad-banning solution, since I occasionally enjoy seeing ads.
Source: Squarefree
Combined weight (in bytes) of all HTML and images on the page, with estimated download speeds. Its main weakness is that it does not measure linked resources, like CSS or scripts. For this, use Q42's GetPageSize (much slower).
Source: Kindly custom-made for me by Dave Lindquist
- ! (view comments)
Expose the invisible comments in the code. Sometimes useful to understand the layout.
Source: endquote.com - Add borders
Adds a green border around each element on the page.
Source: Squarefree - ancestors
Lists the ancestors of any element you hover over in the status bar. One of my favourites.
Source: Squarefree - Check Links
Check for broken links on the current page.
Source: favelets.com - clone slowly
Clones page several chars at a time (to test incremental rendering). Sheer genius.
Source: Squarefree - GetPageSize!
See no.5 above - IE compatibility mode
Pretty simple: Makes IE report whether it's in 'Quirks' mode or 'Standards' mode. More info on CSS-discuss.
Source: Accessify - list classes
Lists classes used in the document (in a new window).
Source: Squarefree - Show and label divs with classes
Highlights ALL div tags with a red border and labels each one with an id.
Source: Accessify - Show and label divs with ids
Exactly as above, but this time only divs that have a class are labelled.
Source: Accessify - Show Divs, Spans & P
Outlines <div> (solid lines, colours indicating depth of nesting), <span> (dotted green) and <p> (dotted blue) tags.
Source: Started at web-graphics.com, but I later changed it to show nesting and paragraphs. Links to this stylesheet on my server. If you want to use it, copy it to your server and update the bookmarklet. - Show Specific Elements
Brings up dialog boxes asking for the element, and what colour to highlight it in. Interesting.
Source: centricle.com - Show Tables
“Turns on table borders and color codes them to reveal nesting. This script inserts a link node into the current document head, which pulls in a stylesheet I maintain on my server. Feel free to download and adapt this to your own purposes: tableborders.css”
One of my favourites. I recommend you copy the CSS to your own server if you plan to use it.
Source: sam-i-am.com - View CSS
Just as useful for web designers as Show Tables, this one pops up a window with links to all linked stylesheets, enabling you to view or download them.
Source: Liorean’s web coding depot - ViewScripts
Similar to View CSS, pops up a window allowing you to view the linked and embedded javascript.
Source: Liorean’s web coding depot - zap presentational HTML
Removes most presentational attributes and tags while leaving style sheets intact.
Source: Squarefree - Zoom in
This pair will zoom in on the current page in 50% increments. Great for pixel level debugging and using with Element Ancestry to click on exactly the element/screen are you are interested in.
Source: sam-i-am.com
Resize the browser window. Useful for testing how layouts fit or reflow at various standard screen sizes.
- javascript-resizeTo(800,600) (A text file, as syntax reference)
- PocketPC iPaq 240x320
- SVGA 800x600
- SXGA 1280x1024
- TV safe 544x372
- UXGA 1600x1200
- VGA 640x480
- XGA 1024x768
Resize the browser window. Useful for testing how layouts fit or reflow at various standard screen sizes.
- Choose style sheet
Adds a feature lacked by IE. Provides users the opportunity to select an alternate style sheet. See the Alternate style sheets example for more information about alternate style sheets. - Toggle CSS style sheets
See what the page looks like with CSS disabled.
- Page Color to Grey
Use this when white web page backgrounds give you eyestrain. Modified from a “Page Color to White” original at bookmarklets.com. Unfortunately this does not work on sites where the background colour is set by the stylesheet. [There are bookmarklets on squarefree for that too.]
Source: Bookmarklets.com - Remove Background Image
Use this when arty textured backgrounds behind the text give you eyestrain. Again, this does not work on sites where the background is set by the stylesheet. [Should be fixable.]
Source: Bookmarklets.com - Statusbar Shows URL
Prevent those pesky scripts from replacing the destination URL in the browser's Status bar with supposedly helpful descriptions.
Source: Can't remember! I think it might be from ZDNet, via web-graphics.com - zap cookies
Removes cookies set by the site, including cookies with paths and domains.
Source: Squarefree - zap
Zaps plugins, colors, cheap effects, event handlers, and timers.
Source: Squarefree
- Alt attributes - images missing alt attribute
Displays all images on the page that do not have any alt attributes - useful accessibility checking tool. Remember, an image such as a spacer gif or an image used as decoration (such as a lined pattern) should use alt=" " (with a space between quotes). - Alt attributes - show all
Displays all images on the page, alongside their alt attributes - useful for checking that alt attributes match up with image.
- Convert abbreviations and acronyms
Highlight some text on your web page (or perhaps some text that you are entering into a textarea, for example a Blogger or MovableType post), then run this favelet - the highlighted text will be passed through the Acrobot, converting all your acronyms and abbreviations. - Links - titles and hrefs
Shows all links on the page and the contents of the link (text and/or images). Also shows title attributes of each link (if present - very useful for assessing how accessible your links are. - Show links
Highlights links on the page in glorious garish lime - Show table headings th
Highlights table headings (yellow text on black background) - use this to see if table headings really are <th> tags or whether plain old <td>s was used instead.
Validate HTML, CSS and HREFs, or all at once using Tantek’s Multivalidator. Also validate XHTML or accessibility (cast.org), or simulate colour blindness. Validation bookmarklets with more options can be found at gazingus.org.
- Accessibility ColorBlindnessCheck
- Accessibility cast.org
- Multivalidator Window
- Multivalidator
- W3C CSS validator
- W3C HREF validator
- W3C HTML validator
- WDG HTML validator
- W3C XHTML validator
- General page stats
General page statistics, including when the page was last updated, what forms and styleSheets are linked, how many images, how many links and so on.
Source: Accessify - getContentSize
Interesting tool for measuring the code:content ratio on a web page. Author's disclaimer: These statistics are good fodder for conversation, and they make you think a bit, but otherwise they're trivia at best.
Source: Holovaty.com - Read Cookie for Site
Shows the cookies stored by the page you're viewing.
Source: Squarefree - Uptime & Server
Shows a Netcraft report.
Source: favelets.com
- Most Recent Internet Archive, Index at Internet Archive
Turns the clock back on the current page, courtesy of the awesome Wayback Machine.
- Go Wayback
- Wayback Analyse
- Wayback Undo
- Google Translate!
Google automatic translation (to English) service. - Look up a definition at dictionary.com
- Look up a definition at m-w.com
- Look up synonyms at m-w.com
- Look up synonyms at thesaurus.com
- Lorem Ipsum
Not a bookmarklet. Links to this text file on my hard disk, which is the standard “greek” text used by typesetters. - SCRABBLE search (Website: validates words, but doesn't define them.)
- Download Calculator.. (56K)
I've had to manually work this out several times in the past (with effort each time), which convinced me of the usefulness of this utility which asks for file size in KB and returns the download time on a 56K modem, in seconds.
Source: Bookmarklets.com - 216 Standard Colors
“Displays the 216 “browser-safe” colors along with their hex code numbers. These are the colors that display the same, without dithering, across all platforms (debatable). The page is entirely generated from within the bookmarklet (so you can use this tool offline).
Tip: If some hex codes are hard to read try choosing ‘Select All’ from the Edit menu. ”
Source: Bookmarklets.com - Basic ISO Latin Characters
“Makes a list of the ISO Latin character codes for the international umlaut, circumflex, grave, and acute characters. Helps when you want to add symbols like ëâìó to your webpage. The page is entirely generated from within the bookmarklet (so you can use this tool offline).
Note: This list may collapse if you do Back-Forward (so you get à is à). Just select the bookmarklet again to rebuild the list. ”
Source: Bookmarklets.com - MASL, notlong and SnipURL
Three competitors of TinyURL. MASL was the first; SnipURL has the most features (letting you create your own shortcut name and password-protecting.)
Post to fjordaan and Post to web-graphics
Post to two Moveable Type (excellent weblogging software) blogs I write on.
Source: www.moveabletype.org
Not a bookmarklet, but a little EXE that you can get from Microsoft.
Also make sure you add the following extras — Links List, Images List and Oper Frame in New Window — to IE's contextual (right-click) menu:
You get them with Microsoft's Web Accessories for IE 5. If you install the Google Toolbar, you get some more useful options in this menu, e.g. Google Search. See also my other tips on customising IE.
Finally, these bookmarklets are mostly only useful to web developers. This is not all they’re good for. Bookmarklets.com especially have bookmarklets for just about anything.
Thank you
Note that I am not the creator of any of the above bookmarklets. I duplicate them on this page as a handy backup for myself, like when I need to customise a new PC. If any of the authors would like their bookmarklets removed from here, and their site linked instead, they need but ask.
Bookmarklets from Simon Willison
I've long been a proponent of flexible web pages rather than restricting sites to a hard coded width in pixels, but now that I've started surfing at 1280x1024 I'm beginning to realise how true the statements about an optimum width for readable text really are. The simple solution would be to surf with my browser window resized to a sensible size, but old habits die hard. Instead, I made myself the following bookmarklet:
It resizes the current page to be 500 pixels wide, which for most flexible designs makes the text much easier to read. It's only tested on Firebird. I also find Verdana to be the most readable of the web fonts, so I've created the following bookmarklet which alters the default text style for the page - ideal for reading Slashdot ;)
Both bookmarklets are extremely simple, but I have been using them all day and have found them very useful.
Make fixed fonts resizable in IE (drag it on to your links bar and use it on any offending pages, then resize text with ctrl+mouse wheel).
Disable stylesheets for current page
Bookmarklets from scriptygoddess
Bookmarklets from Make-believe
I coded up a little tool for web designers. It's a bookmarklet/favelet that provides you with a "height map view" of the page you're looking at—that is, more deeply nested elements are given a lighter background.
It's a hassle to explain, but if you click the link below you'll see what I mean.
Link: Topographic view
Refresh the page to restore it.
If you want to use it with other pages, just drag the link to your browser's Links bar. Then click it while viewing a page to see it in all its skeletal splendour.