Apart from a couple of widgets, I have written two Opera extensions. The first was Show Filtered Content, a proof of concept of how to use the Opera Link API, and OAuth in  general, from Javascript. Now, due to a couple of coincidences (isn’t life all about that?), I decided to write Meme Smileys: a very silly extension to turn text smilies into small pictures taken from popular memes like the rage guy and such. It’s my own version of a Chrome extension I had seen. Partly I wrote it because I wanted to have it, partly for the lulz, partly to learn a bit more Javascript, and partly to use Jasmine more. The surprising thing was that writing such a trivial, small extension did teach me a couple of things:

  1. The NodeIterator/NodeFilter Javascript API. I ended up not using it for the extension, but it’s good to know.
  2. The DOM event “DOMNodeInserted”, very useful when you want to do some work based on new elements “appearing” on the page (as it’s more and more common).
  3. Javascript regular expression lookahead/lookbehind. The latter, which I needed, is not supported by Javascript, so I had to use a lookbehind mimicking trick/workaround to get what I wanted.
  4. It gave me a bit more experience in Test-Driven Development. Which reminds me: if you are interested in Javascript and TDD and you happen to understand some Norwegian, have a look at the excellent zombietdd screencast series!

As always, the code is on GitHub, so you can read it, fork it, make your own extension based on it or whatever you want.

EDIT: I forgot to mention that the meme smiley extension got quite popular because it was featured in the Choose Opera blog (twice!) and then “recommended” in the Opera extensions homepage :-D