ofTheo/mittens — pull request #2 by divergentdave (2012-02-25 01:26:55+00:00)
Title: Faster extension

Here's a faster version of the extension. This uses XPath instead of jQuery to find the text nodes to be modified. It also hooks DOM mutation events to handle AJAX-y websites.

Here are some speed tests of the code
jQuery (mittens3.js, 768ms) : http://jsfiddle.net/divergentdave/jNbxs/
jQuery (mittens.js, 915ms) : http://jsfiddle.net/divergentdave/cCjmM/8/
XPath (22ms): http://jsfiddle.net/divergentdave/cCjmM/6/

(I only updated the Chrome and Firefox extensions, as I am unfamiliar with Safari)