Bookmarklets and Greasemonkey

Here are some bookmarklets and greasemonkey scripts I’ve written for my own use but think might be useful to someone else out there. Everything here is public domain unless specifically noted otherwise but if I ever write anything substantial here I would appreciate being kept in the credits if you use it. If you have any suggestions or requests for improvements feel free to drop me an email but their are no guarantees and I’m bad at replying to my mail.

Bookmarklets

Some bookmarklets I wrote when I couldn’t find anything that did what I wanted in any of the repositories. Unless noted otherwise these are tested only on firefox. Right click on the links and select bookmark this link to save a bookmarklet for later use.

List Selected Links
While adding links to my wordpress search engine I often had the need to copy the link locations of many links on a page but not all the links on the page. Select a portion of a webpage and execute this bookmarklet and it will open a new window containing the link locations (hrefs) of all the links in your selection for easy copy and pasting. The new window also includes the original links. Almost certainly guaranteed not to work in anything but gecko based browsers and maybe opera.
Build Amazon Referrer Link
So from time to time I mention books on this blog and I figured I might as well sign up for Amazon Associates referral program. After all if I’m going to link to amazon anyway I might as well get some money if anyone ever buys anything. However the normal amazon link builder is really annoying. While amazon does offer a bookmarklet to build the link for you it still includes the stupid image tracking stuff and makes an extra long link. The other bookmarklets I found on the web to generate short links all did shady things like sneak in their own referrer code. So here is a bookmarklet that fixes that problem. Just use it on an amazon product page (probably won’t work for searches) and it will place a box at the top of the page with the ASIN of the product and a link with indications on where to fill in your referrer tag.

By default the above bookmarklet will leave the refer as YOURID which you will have to replace by hand with your actual referrer ID if you would like to customize the bookmarklet so if remembers your associates ID click here before dragging the bookmarklet to your toolbar.

Greasemonkey Scripts

I2 Direct Linker
Improves a script replacing indirect links with their destination. Specifically improves decoding of base64 encoded destination URLs. The original script was conceived with the browsing of porn galleries (TGP) in mind but is useful for removing any simply obfusciated misdirection. If the original author spicyburrito wants to take this script back over and integrate my improvements he is welcome to contact me.