This JS actually has to work back to Firefox 4, while `CustomEvent` was added in Firefox 6. We should add a polyfill, but I'm going to file a bug for that since it's not quite directly related to this PR (which is just pulling the existing global JS into the site).