• Projects
  • Photos
  • Fiction
  • About
  • My desktop
  • Resumé
  • Contact
  • 8 Dec 2005

    I was inspired yesterday to work on a new Greasemonkey script. Reminded about Jesse Ruderman's Bash.org Instant Voting script, I made a similar script for flagging posts and comments on Metafilter. Metafilter Asynchronous Flagging allows you to flag posts and comments without having to go through the two interstitial pages and losing your line of thought in the thread.

    (I had to flag one of my own comments approximately thirty times while I was testing it. I wonder what Mathowie thought about that.)

    Discuss (1)
    • firefox
    • greasemonkey scripts
    • programming
    • projects
  • 23 Nov 2005

    I updated the Greasemonkey script "Flickr More Home" today. It used to get its data from the RSS feelds, but I'd had problems with the feeds not actually showing my contacts' most recent photos. Plus they'd always be missing non-public photos that I had access to.

    So now it uses the HTML pages to get the list of photos instead. I don't know if that's harder on Flickr's servers (it's certainly less elegant), but since it caches them, it's only really two more hits per Flickring session.

    Update 14 Dec - Fixed to work with Greasemonkey 0.6.4

    Discuss (3)
    • firefox
    • greasemonkey scripts
    • photos
    • programming
    • projects
  • 22 Jun 2005

    I was working on a Greasemonkey script yesterday, and I ran into a problem for a second time. I had data (in this case, XML, in the previous case, HTML) that I had retrieved via GM_xmlhttpRequest() (Greasemonkey's cross-site-capable and slightly more flexible implementation of the XMLHTTPRequest object). I wanted to grab some small piece of information out of the huge string, but the easiest way to do this that I could think of was with big ugly Regular Expressions. The data was goddamn XML, why couldn't I use DOM? The ideal solution would be if Greasemonkey added a responseDocument field to the data that it passes to the onload callback. Since the ideal solution is not currently available, I had to cobble something else together.

    Update 9 Nov: I found a far better solution today. I can hardly believe it.

    var xmlDoc;
    if (typeof(DOMParser) != "undefined") {
        var parser = new DOMParser();
        xmlDoc = parser.parseFromString(x, "application/xhtml+xml");
    }
    Discuss
    • greasemonkey scripts
    • programming
  • 25 May 2005

    I've created a new Greasemonkey user script awkwardly named "Metafilter mark contact contributions". I mark people that I've met at meetups as contacts on MetaFilter, and I like to be able to have a reminder when I see something from that user. Slashdot has a feature like this built in (it uses small green and red globes), and I figured that with some of GreaseMonkey's cross-site XMLHTTP functions, this would be pretty easy. It was.

    Install Firefox and Greasemonkey and right click here to install the user script. Here is a sample screenshot.

    Discuss
    • firefox
    • greasemonkey scripts
    • programming
    • software
  • 25 Mar 2005

    I discovered the Firefox extension Greasemonkey in early March 2005. I had probably heard of it before then, but I don't know why it had taken so long for me to really look at it. It's exactly the kind of thing that appeals to me: injecting Javascript (often with DOM actions, possibly with Ajax) into any web page. Every once in a while, I come up with an idea for a one-off script. They're all available from my profile on Greasemonkeyed.com.

    Discuss (11)
    • greasemonkey scripts
    • programming
    • projects

Comments and trackbacks are owned by their respective authors. Except where otherwise noted, all other content is licensed under an Attribution Creative Commons license by Logan Ingalls.

Validate: HTML, CSS