Code supplementing my talk "Taking JavaScript Offline" https://gist.github.com/meagar/9600625