mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14: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
|
* @param string first three characters of database system version
|
||||||
*/
|
*/
|
||||||
function bodyLoad(version) {
|
function bodyLoad(version) {
|
||||||
if (history.state) { // copied from editor/static/editing.js
|
onpopstate(history); // copied from editor/static/editing.js
|
||||||
onpopstate(history);
|
|
||||||
}
|
|
||||||
var jushRoot = '../externals/jush/';
|
var jushRoot = '../externals/jush/';
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.src = jushRoot + 'jush.js';
|
script.src = jushRoot + 'jush.js';
|
||||||
|
@@ -346,7 +346,7 @@ function ajaxSend(url, data, popState) {
|
|||||||
* @param PopStateEvent|history
|
* @param PopStateEvent|history
|
||||||
*/
|
*/
|
||||||
onpopstate = function (event) {
|
onpopstate = function (event) {
|
||||||
if (!event.state || confirm(areYouSure)) {
|
if (event.state ? confirm(areYouSure) : ajaxState) {
|
||||||
ajaxSend(location.href, event.state, 1); // 1 - disable pushState
|
ajaxSend(location.href, event.state, 1); // 1 - disable pushState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
// Editor specific functions
|
// Editor specific functions
|
||||||
|
|
||||||
function bodyLoad(version) {
|
function bodyLoad(version) {
|
||||||
if (history.state) {
|
onpopstate(history);
|
||||||
onpopstate(history);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user