Is the tree green?

The internets are serious business. When you’ve got questions, they’ve got answers… Is Lost on TV? Is it a rerun? What year is it? 2009? 2010? Has the LHC destroyed the world yet? Is Abe Vigoda still alive? Is it MFBT?

Which brings us to the question frequently asked by Mozilla developers. Is the tree green? Ta-da:

Some random factoids about isthetreegreen.com

  • It’s using a cross-site XMLHttpRequest to fetch the tree status from Tinderbox. This is a neat way to generate the answer in the browser (instead of scraping the status from a cron script on my webserver), but it means you’ll need a recent browser (like Firefox 3.1!) which supports this.
  • It’s surprisingly snappy. The HTML is about 7K, and the XHR status is about 2K. Compare that to the normal Tinderbox page, which weighs in around 220K.
  • The page polls the Tinderbox status every 2 minutes and updates the displayed status. The first time the state transitions from not-green to green, it will trigger an alert(). I think this will be rather useful if you’re waiting for the tree to turn green before checking in a patch.
  • It doesn’t check if the tree is open or closed. (Yet?)

Thanks to Jesse for the original idea, and to Reed for helping to get the Tinderbox server configured to allow XS-XHR.

About Justin Dolske

Mostly harmless.
This entry was posted in Firefox, PlanetMozilla. Bookmark the permalink.

12 Responses to Is the tree green?

  1. Jeff Walden says:

    Dolske, if you recall me saying I had a brilliant idea a month or two back when I was still sitting in the center of the office sort of across from you (also that I wasn’t stupid enough to tell you what it was ;-) ), this was essentially the idea I had. I think mine was actually for isthetreeopen dot com (but it would have done the all-green check in addition to the not-closed check), but I also planned to buy up the predictable synonyms and antonyms at the same time. (Seriously, you should do that.) If I ever got around to actually making any of this happen, that is, which arguably I might not ever have done (or I might have just parked the domains but not actually made them functional for a long time afterward). :-)

  2. Gary Kwong says:

    Could you please support the Thunderbird tinderbox trees? :-) (and calendar / SM ones too)

  3. @Gary:

    You already can, although to keep the page minimalistic I probably won’t add them to the footer.

    http://isthetreegreen.com/?tree=SeaMonkey
    http://isthetreegreen.com/?tree=Thunderbird

    @Waldo:

    Really? I either didn’t hear you or completely forgot! :(

  4. Mark says:

    Looks like I should note that this doesn’t work on Firefox 3.0 (unless there’s something weird about my computer) as it does not support cross-domain XMLHttpRequests as noted by the error I received: “Your browser doesn’t support cross-domain XMLHttpRequests. :-(“

  5. Mark Banner says:

    Alternately just use Tinderstatus! https://addons.mozilla.org/en-US/firefox/addon/832

    Though we really should get around to implementing alerts in that at some stage.

  6. The text on that page is nowhere near large enough. Double it.

  7. Martijn says:

    Why not use Javascript instead of xmlhttprequest. In that case it would work in all browsers.

  8. @Martijn:

    Partly because I just wanted to try it this way, and partly because the Tinderbox JSON is 100x larger than the quickparse.txt output (200K+ vs 2K).

  9. bernd says:

    You could replace the page with a static NO for ff 3.0, that is accurate 99% of time.

  10. Mark says:

    I don’t follow the tree as much so I don’t know if it would change so much as to be ridiculous, but is there anywhere that there is an RSS feed Tree status?
    If not, the feature that comes to mind when I view this very simple page, is to add an RSS feed that puts out an entry every time the status changes.

Comments are closed.