Chrome and Firefox broken

The file currently uses a global history variable, due to changes in modern browsers this variable now is the global history object.