In which we realize that (for once), JavaScript is the answer.