Commit dae819c8 authored by fred's avatar fred
Browse files

do not pushstate when going back in history

parent aef7b4c6
......@@ -95,11 +95,13 @@ $(function() {
};
$(window).on("popstate", function(e) {
if (e.originalEvent.state !== null) {loadPage(location.href);}
if (e.originalEvent.state !== null) {loadPage(location.href, false);}
});
loadPage = function(href) {
history.pushState({}, '', href);
loadPage = function(href, push_state) {
if (push_state !== false) {
history.pushState({}, '', href);
}
if (loadPage_request !== null) {
loadPage_request.abort();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment