Chapter 5: Bookmarklets

If you need help installing bookmarklets, I maintain a page with instructions for many browsers at http://mreidsma.github.io/bookmarklets/installing.html.

Rainbow Header

This bookmarklet changes the header of the page. Go ahead and click it to run it on this page.

Rainbow Header

Add Unicorn

This bookmarklet adds a friend to most web pages. Click it to run on this page, or drag the link to your bookmarks bar to install it.

Add Unicorn

Remove Header

This bookmarklet removes the header from this page.

Remove Header

Move Header

This bookmarklet removes the header from this page.

Move Header

Exercises Count Bookmarklet Code

Below is the code for the exercises bookmarklet. Install it in your browser, and head over to the Exercises Home Page to try it out.

javascript:(function(){var liList=document.getElementById('table-of-contents').getElementsByTagName('li');var liElements=li.List.length;alert('There are ' + liElements + ' exercises for this book');})();

Complex Bookmarklets

Many scripts are too complex to fit in the bookmarklet itself, so we can use the bookmarklet to append longer scripts. Below is the code for a bookmarklet that installs a remote script. Install it in your browser and try it on a web page. It should look familiar!

javascript:(function(){var newScript=document.createElement('script');newScript.src='//mreidsma.github.io/vendor_tools/js/bookmarklet.js';document.body.appendChild(newScript);})();

Library Examples

ProQuest's 360Link 2.0 Bookmarklet

This bookmarklet allows ProQuest customers to reload the current link resolver page with their new 2.0 interface, so that libraries can test the new features without needing to set up a test environment or inconvenience users.

ProQuest's 360Link Bookmarklet in action

javascript:location.href=location+'&newUI=1clickoff';