diff --git a/adminer/static/editing.js b/adminer/static/editing.js index aad7cf03..757d8ee2 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -4,9 +4,7 @@ * @param string first three characters of database system version */ function bodyLoad(version) { - if (history.state) { // copied from editor/static/editing.js - onpopstate(history); - } + onpopstate(history); // copied from editor/static/editing.js var jushRoot = '../externals/jush/'; var script = document.createElement('script'); script.src = jushRoot + 'jush.js'; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 963224d9..6cf09ebc 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -346,7 +346,7 @@ function ajaxSend(url, data, popState) { * @param PopStateEvent|history */ onpopstate = function (event) { - if (!event.state || confirm(areYouSure)) { + if (event.state ? confirm(areYouSure) : ajaxState) { ajaxSend(location.href, event.state, 1); // 1 - disable pushState } } diff --git a/editor/static/editing.js b/editor/static/editing.js index 47fc8e72..b58ed71a 100644 --- a/editor/static/editing.js +++ b/editor/static/editing.js @@ -1,7 +1,5 @@ // Editor specific functions function bodyLoad(version) { - if (history.state) { - onpopstate(history); - } + onpopstate(history); }