[WIP] 95% there for Chrome and Firefox

Needs testing across other browsers.