Paul Irish

Making the www great

Javascript CSS Selector Engine Timeline

I’m interested in understanding all the selector engine code. In order to watch the development from the most basic to the quickest, I wanted to gather all the data points. Take a look, as you can see, Jack Slocum was definitely right when he said “selector processing power has gone from Pinto power to a Mustang GT 500.

Interactive Timeline


Update: Added Base2, CssQuery1.0. Corrected jQuery launch date.
Update: Added Dojo 0.9, NWMatcher.

Leave a comment if I left anything out.

2012.04.25 (four years later): I’ve referenced this timeline in my StackOverflow answer to What is the source of the double-dollar sign selector query function in chrome / firefox?. :)
2013.02.12: When Alex Sexton helped port my blog to octopress, he added in an interactive timeline.

Unobfuscating Packed Javascript

I started to get curious around Virb’s code and wanted to take a peek at how they’re doing some things.. Their global js didn’t prove to be too helpful.. It was just packed and obfuscated: http://www.virb.com/_js/global.js

packedcode.PNG

In fact, a lot of javascript gets packed up these days with Dean Edwards amazing Packer functionality. This is great for delivery and optimization, but hard for people to poke in and learn some new techniques. I couldn’t be so easily defeated by Virb’s code.

Ryan at YAIB created a little bookmarklet widget to enable the decode functionality at dean’s packer site. Drag the reEnable link to your bookmark bar, then head over to the packer site and click the button. The “copy” textarea should now be writeable and the decode button activated. Now copy in your packed and obfuscated code and hit decode.

If successful, you should now see some var’s and null’s and everything be looking a little more like readable javascript. Head over to Beautify Javascript, paste your decoded code in, and hit the big button.

You’ll now have some nice looking javascript to inspect. Cheers.

Update 2008.12.17: Changed to use Beautify Javacript instead of PrettyPrinter.de

Best Greasemonkey Scripts Ever!

Included in this package:

  • Greased Lightbox
  • Amazon Wishlist ajax delete
  • autopagerize
  • cleaning up google reader (my style fixes)
  • delicious reorganized (a nicer skin for del.icio.us)
  • flickr auto-page
  • gmail spam count hide
  • google reader preview (load destination link into google reader)
  • paul’s myspace fixes (bunch of stuff that makes myspace suck less)
  • textarea resize (ctrl-enter to make a multi-line text input taller)

Paulsfavoritegreasemonkeyscripts.zip

Open the zip and open the files in firefox. say yes when it prompts you to install.