Crude Spritz implementation in JavaScript.