It works, with terrible JavaScript