mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
Avoid double AJAX refresh in Chrome
This commit is contained in:
@@ -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';
|
||||
|
@@ -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
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
// Editor specific functions
|
||||
|
||||
function bodyLoad(version) {
|
||||
if (history.state) {
|
||||
onpopstate(history);
|
||||
}
|
||||
onpopstate(history);
|
||||
}
|
||||
|
Reference in New Issue
Block a user