danpalmer/jquery.complexify.js — pull request #3 by midnightmonster (2012-05-17 17:19:15+00:00)
Title: more improvements

So far I'd only looked at the parts I needed. Then I noticed that you extend the String prototype. There's a case to be made for that as a legit practice, but as a side-effect of using an otherwise single-purpose library, it's dubious, and in this case the string prototype would only get extended if complexify is actually called at some point on the page.

So I replaced the whole containsCharSet with a single regex method call and the charset strings with regexs, which make the code considerably shorter. Speed is a non-issue when you're talking about a couple msec anyway, but in my non-scientific testing, this also made complexify ~10% faster (in Firefox on Win 7 on a glorified netbook).

(and this is asking you to pull again all of my commits. I don't know how to make it do a more sensible-seeming pull request, but as you've already pulled the others and I merged your changes, the net effect of pulling these will be correct)