Adverts get pretty annoying when you’re trying to concentrate on the details of a technical article. The tendency to stick bloody great images just after the first paragraph is something that I especially find irritating. I tend to find myself hitting “print friendly” links as soon as possible. As articles then tend to get delivered as a single page, this is also useful when skimming through something.
I thought about this a bit (but not that much) and decided to hack up a bookmarklet to do this for me. I could then have a button in my browser toolbar that would find the print-friendly version of a page for me.
Here it is:
Outa The Way!
This uses the Bookmarklet Bootloader Javascript technique to dynamically insert a script element into the page you’re viewing. That script then auto-executes (i.e. calls a function) to do some useful work. In this case it just attempts to determine what site you’re reading then use some basic rules to either construct the print version of the URL, or find the link on the page.
It should also probably look for print versions of CSS stylesheets and all sorts of other clever things. I’ll continue hacking on this, and would be interested to hear comments on improvements, as well as rules for determining print-version pages for other sites. The neat thing about the bootloader concept is that you can be certain that you’re always running the latest version of the code as it grabs it a-fresh from my site every time. If you want a local copy or decide to mirror it, then you’ll want the actual script. It’s not going to win any coding awards, so improvements appreciated.
At the moment it works on IT world newsletters, the Washington Post, Javaworld, and the O’Reilly network. It also includes a Gamasutra by-pass bookmarklet stolen from the Daily Chump.