New script(add popstate function)