Firefox, Plugins and Jetpack Widgets

Flash was chewing CPU in one of my myriad tabs, so I used Jetpack and the new AddonsManager API to whip up a quick add-on to enable and disable Flash quickly. It’s <30 lines of code and an image. It puts an icon in the Firefox 4 add-on bar that toggles the plug-in, and sends a Growl notification (or whatever system your OS uses) indicating that the plug-in was successfully enabled or disabled. Screenshot:

Install FlashToggle. Requires Firefox 4 beta 7 or newer.

Clone and make your own on the Add-on Builder. This might require a minor change in the code since I built using Jetpack 0.10, which isn’t released yet. Changing ‘contentURL’ to ‘image’ in the widget options should do the trick.

The entire code listing:

function toggleFlash(callback) {
  const { Cu } = require("chrome");
  Cu.import("resource://gre/modules/AddonManager.jsm", this);
  AddonManager.getAddonsByTypes(["plugin"], function(addons) {
    for (let i = 0; i < addons.length; i++) {
      if (addons[i].name == "Shockwave Flash") {
        addons[i].userDisabled = !addons[i].userDisabled;
        callback(addons[i].userDisabled);
        break;
      }
    }
  });
}

let flashLogoURL = require("self").data.url("flash-logo.jpg");
require("widget").Widget({
  label: "Toggle Flash",
  contentURL: flashLogoURL,
  onClick: function() {
    toggleFlash(function(disabled) {
      let message = "Flash is now " + (disabled ? "disabled" : "enabled") + ".";
      require("notifications").notify({
        title: message,
        iconURL: flashLogoURL
      });
    });
  }
});

What this isn’t.

It’s not a blog post about how I don’t blog enough. That’s exactly what it’s not.

Hidden Egg


The Magic is in the Tubes

“The gains shown by the iPhone and Android show what is possible when phones are built with fully capable browsers and support a rich array of Web apps.” – Techcrunch

The most kick-ass mind-blowing iPhone, Crackberry or it’s-not-a-Google-phone is naught but a brick without an always-on ubiquitous wireless internet connection.*

Apple may have revolutionized the user-experience of the smartphone, but the Blackberry’s early success proved that the crux of the device’s addictiveness lies in the tubes.

* That’s not entirely correct. You could still use this.


Seven Things About Me(me)

Alas, I was tagged by Beltzner, so must break my new year’s resolution to not blog in 2009*. Thanks Mike. Seven things you may know about me, or not:

  1. I have three nipples. Of these, zero produce milk.
  2. I was a barista and a chef for many years before owning a computer.
  3. I can juggle. Balls. Clubs. Machetes. Torches. (Listed in descending order of skill-level and recency.)
  4. Some years ago, on the night before we moved from Seattle to Florida, someone stole our fully-packed truck and U-Haul, leaving us with nothing but the pajamas we were wearing, and a goldfish. It was a lesson in impermanence.
  5. I used to play the accordion, and was briefly in a band called Apolkalypse.
  6. One summer, I hitchhiked through 30 states with a friend. You’ve not truly seen America until it throws garbage at you from it’s car.
  7. I flew out of a rapidly moving Volkswagen bus when I was 8 years old, and landed on my head. I know what you’re thinking, and yes, you’re probably right.

Seven from me, seven to you:

  1. Sdwilsh. It’s all business on your blog, but your quotes are on fire.
  2. Thunder, the Venezuelan ramen-lover. (Definitely a character in my novel. If I was writing one.)
  3. Josh. I thought your blog was dead, but then I found the tumble.
  4. Jeff, you don’t blog, afaik. You should tweet seven things and seven people!
  5. Bowie. Kid, you’re almost one full year old. Introduce yourself.
  6. James Earl Plush. Eagles? Beagles? Twins? Coincidence? I think not!
  7. David Cross. (Aim high, right?)

* I’ve been tumbling and tweeting regularly, so I kinda already broke my resolution.


sometimes attribution just isn’t worth it

(11:26:57) me: ugh
(11:27:02) me: it’ll never end:
(11:27:05) me: “I’m writing an application for the Coast Guard Auxiliary that uses your NUSOAP code..”
(11:27:11) me: the coast guard?
(11:27:13) me: using my code?
(11:27:18) me: our borders are not safe
(11:27:47) him: lol
(11:27:53) him: fix it dude
(11:28:15) me: those php XXXXXXXs have caused me no end of trouble
(11:28:29) me: the php5 soap impl uses a class name that’s the same as nusoap
(11:28:40) me: so i get like 5 emails a week, ever since php5 was released
(11:28:46) me: all with this same error
(11:28:52) me: not only that
(11:29:11) me: the latest version of nusoap (2 years ago or whatever) has it fixed!
(11:29:22) me: which means all these people are downloading an old version from somewhere
(11:29:24) me: OR
(11:29:29) me: are only now upgrading to php5!
(11:29:35) me: i XXXXing hate open source
(11:30:18) him: lol
(11:30:21) him: rant over?
(11:30:25) me: yes
(11:30:31) me: i feel much better now


Vacationeering

We stayed on Ambergris Caye in Belize for a week (pics), 1/2 mile from the 2nd largest coral reef in the world. We then went overland to see the Mayan ruins at Tikal in Guatemala (pics).

We got stuck in Dallas on the way back, so flew back Monday morning, dropped our stuff off at the house and went straight to Kumoricon, Portland’s anime/manga/cosplay convention (pics)!

What a crazy week. Ok, back to work.


Feed organization and entropy

I use Google Reader to read feeds. I have a “daily” folder for feeds that I really need to keep up on, and everything else is filed away into about 20 other content-specific folders.

However, I realized that I only read the “daily” folder, and never look in any of the other folders. Ever. And I’m continually paring down the contents of the “daily” folder, as I don’t have time to keep up with those either.

In fact, I’d stopped reading about music, food, art, design, inventions, gadgets, free mobile games, travel.

In the end, I was basically reading Planet Mozilla and the Mozilla wiki’s “recent changes”. And while I love Moz, that’s a far too singular lens through which to vicariously experience life.

So, I’m going for the “river of news” strategy: I’ve moved all feeds into the root folder, and will prune from there. I’ve hidden the folder tree (which I wasn’t using anyway), which leaves more real estate for content. I’ve interspersed my work with my play feeds, which will hopefully bring some variety into my digital walkabouts.

I have a followup task: to step away from the computer altogether at some point.

Ack, almost forgot about the “entropy” part of this post! While pruning feeds, I noticed that a bunch hadn’t had any posts in a while. I checked out a few, and found that the feed URL had changed, but the author hadn’t set up redirects, or published any notice at all on the feed. Lame.


Follow

Get every new post delivered to your Inbox.

Join 26 other followers