Convert pushstate to js

As above :point_up: