- Greasemonkey EASY authenticated Flickr API call: Documents F.API.callMethod(). Thanks be to Bob, this saved me about two days of de-obfuscating.
Things I have done in the last week or so:
- Turned my MySpace page into a tumbleblog (cooler non-myspace version here) to try to funnel some of my friends who live on myspace out into the actual internet. This is all powered by standard PHP5 with lastRSS.
- PHP script to provide an RSS feed of your weekly last.fm charts. It just displays the most recent week’s charts, but that’s enough really. Useful for, say, including the charts in your tumbleblog. [source]
- Updated Flickr Photo Page Enhancer greasemonkey script. Changes to flickr site = changes to script.
I’ve also worked 43 hours as of Thursday, and also, excitingly, my car blew up. Which means lots of exciting meetings with loan officers at my bank as they try to find polite ways to say “have you actually seen your credit report, fool?” So I don’t know what else you might want from me, but you ain’t getting it. I’m going to bed now.
I’ve turned my attentions back to Greasemonkey of late, mostly little things to squash some annoying misfeature or otherwise make a website less cumbersome to use, but I haven’t been publishing these scripts. Most of them are too simple to bother, but it seems to me the two I wrote earlier this evening might actually be useful to someone else.
The problem I had was that I needed to get my 800+ ratings out of Netflix because I’m canceling my account. (There’s lots of good reasons, there have been whole articles written in respected news outlets, but the fact of the matter is that even after going back to the one-at-a-time plan, I can’t justify the expense seeing as I’ve had the same movie for two months.) I decided to put them in AllConsuming because, unlike NetFlix, all the data you put into AllConsuming can be easily exported again. Here are the scripts:
- allConsumingInNetFlix.user.js - After every movie title on any NetFlix page, this script adds a link to an AllConsuming search for that title. It also adds a floating link (top left) to open a search window for all movie links on that page, for exporting your queue or your ratings.
- AllConsumingWorthIt.user.js - This replaces the select box on an AllConsuming item page with a series of radio buttons. This reduces the number of mouse clicks required to rate something from two to one. Believe me, when inputting over 800 ratings, those clicks add up.
It struck me as I was doing this that the first greasemonkey scripts I wrote, almost a year and a half ago, were to overcome shortcomings of the NetFlix site. Now, after DVD throttling and Netflix guilt, I’m writing scripts to free my data from them. Here’s hoping other sites I’ve lavished scripting attention on don’t meet similar ends.
- VoxRichEdit.user.js: I think we all know the deal at this point.
Damn, that’s pretty. Okay then:
- There was an issue with group pools and the Thumbnails enhancer (a <div> became a <p>). I fixed it.
- RIP: Flickr User Icon Enhancer ist kaput, as there is no more need for it. The user icons are perfect now. Completely and totally ideal. Bravo.
- As I always have to have my ‘Last 24 Hours’ fix, here’s a script to add a link to the last 24 hours of Interestingness to the new Explore button.
That’s really all the changes that needed to be made. This is going much more smoothly than I thought it would. And once again: damn, that’s pretty.
User Script: del.icio.us notes max length. Don’t you hate it when you type a note on a link in del.icio.us, only to find that it’s been truncated after you click submit? And why are notes only allowed to be 254 characters anyway? Well, this solves one of those problems. Unlike using maxlength to not allow any further input (because I hate that), the script just warns you that need to edit a little before you submit.
Well, it looks like I was wrong about the Bloglines Continuous Update script being outmoded. Though Bloglines does display a running tally of unread items in the page title now, they don’t take the obvious next step of using their own API to see if that number is up to date. So I took out all of the code that counted unread items and displayed the total (which was a lot of code), and now all the script does is check the API for updates and reload the subscription panel if it finds them. Get it here.
Scripts that have been updated, in some way, due to Firefox 1.5 and Greasemonkey 0.6.4:
- Flickr Photo Page Enhancer: It originally used GM_XmlHttpRequest, that went away in GM 0.3.5 due to security reasons, I replaced it with regular XmlHttpRequest, which went away as a side effect of new security measures in 0.6.*, but GM_XmlHttpRequest is back. Did that make any sense to you? Me neither.
Update 04-Dec-05: Okay, now it uses E4X and it’s pretty and elegant. Whee! - Flickr Thumbnails Enhancer Same reason as above, same ugly, ugly hacky solution to the problem.
- del.icio.us >> My Web: del.icio.us redesigned (and might I say damn fine job), and this script was highly dependent on the page structure. Fixed.
- Yahoo User Persistence Thing: There was an existing bug with selecting “Other..” not working correctly.
- Update 03-Dec-05: Flickr Rich Edit, Flickr Tag Quick Edit, and Flickr User Icon Enhancer: Done in by changes to unsafeWindow. Fixed.
Also, several scripts that are no longer useful are no longer under active development. These include the Flickr Login Thing (Yahoo Login Thing pretty much covers that), the Bloglines thing (now built into Bloglines… when did that happen?), and several one-offs that I made on request but don’t actually use myself.
Greasemonkey 0.5.1 has officially been marked safe for public consumption. I suppose this is a good a time as any to point out that all of my scripts will work with the new Greasemonkey under Firefox 1.0.x. If yours stop working when you upgrade, get the latest version, as adjustments had to be made to some scripts. As far as Deer Park (which will be Firefox 1.5 or thereabouts, once it’s deemed complete), mostly they will not work. If experience is any teacher, the scripts will probably not be fixed for Deer Park until it becomes a day-to-day issue for me. If there’s a script you can’t live without in the meantime and you’re running Deer Park, don’t be afraid to let me know.
Welp, another Greasemonkey, another problem. More barriers have been put in place between content and user scripts, and though this is a good thing for security, it screws up some of my scripts largely due to my own lazy coding practices. All of the user persistence scripts (Yahoo, Google, Flickr) have been updated to work in the new Greasemonkey (called 0.5, announced here).
While I was doing that, I made sure they work in Deer Park, the test version of the next Firefox. This is not a given, as Greasemonkey under Deer Park does some things differently than under current versions of Firefox. So when a version of the browser that is based upon Deer Park comes out, these three scripts at least will be ready to go. The rest of my scripts… well, when we get there, we get there.
I’ve updated the Flickr Photo Page Enhancer, Flickr Thumbnail Enhancer and Bloglines Continuous Update greasemonkey scripts to use plain old XMLHttpRequest instead of the GM_ API version. There was no real reason for them to use GM_XMLHttpRequest other than, well, that was the example I cribbed from. The point of all of this is that they now work with the “safe mode” Greasemonkey 0.3.5. As a happy side effect, they run noticeably faster than the old versions.
There’s something of a tempest about security over on the Greasemonkey list. Turns out all of the GM_* API functions are available to potentially malicious code on any website where a script is called (this is bad). Stopgap measures:
- disable all scripts which are called for any page,
- download and install this neutered version of Greasemonkey which removes all the GM_* functions (many scripts will break), or
- uninstall or disable Greasemonkey.
Personally, I feel that last one may be a bit of an overreaction. Hopefully, this will be fixed very soon (these folks are brilliant), but now that the vulnerability has been exposed, you can rest assured someone will waste no time taking advantage of it.
Okay, as previously mentioned, I am (or rather, some of my work is) going to be in a book. All that remains after the paperwork is filed is for me to write a short, one paragraph blurb about myself for the contributors page. This is where you people come in. I’ve written an average of 200 words a day for over eight years now, and I like to think I can riff on any topic at a moment’s notice, but on this one paragraph I’m totally paralyzed. Help! What sort of things should I include, besides my URL? What tone should I take? Should I try to match the tone of the work? Should I make fun of those faux-serious author bios in the back flaps of novels? The thing that keeps bugging me is that this book may end up in front of quite a few eyeballs. Eyeballs of people who are right behind the crest of bleeding-edge technology, as ultimately frivolous or profound a technology as Greasemonkey/user scripting may turn out to be. People who may have it in their power to give me a job. Okay, now taking all that into consideration, go.
I did kind of imply that I would make improvements this Greasemonkey script that adds a “copy this link to Yahoo My Web” functionality to del.icio.us. Specifically, that the script should copy tags and descriptions as well, not just the link and the title. Unfortunately, I had to rewrite the whole thing to get it to work like I wanted it to. So don’t blame the author of the original script for any mistakes I may have made. Install: delMyWeb.user.js
Quickie Greasemonkey script: Flickr Tag Quick Edit. Next to the little [x] to remove a tag, you’ll now find a link directly to the page that allows you to edit all instances of that tag.

