Reverts #5551e12, commit has breaking changes for non-WebKit browsers.