Add a few hundered lines of unoptimised JS.

I take no repsonsibility for your CPU.