Fixes for Firefox and other standards-compliant browsers

In case people want to run this in their web browsers.