Port of Doom to javascript