Skip to content
Snippets Groups Projects
Commit b43122f7 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

url is updated every 4 seconds in necaessary

parent 5da9d28a
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!553Resolve "allow to open multiple data overlays using url GET param"
......@@ -110,14 +110,15 @@ GuiConnector.prototype.init = function () {
};
var lastUrlUpdate = 0;
var newUrl = "";
function updateUrl(url) {
if (lastUrlUpdate + 250 < new Date().getTime()) {
lastUrlUpdate = new Date().getTime();
window.history.replaceState(null, null, url);
setInterval(function () {
if (!window.location.href.endsWith(newUrl)) {
console.log("update: " + newUrl);
window.history.replaceState(null, null, newUrl);
}
}
}, 250);
/**
*
......@@ -140,7 +141,7 @@ GuiConnector.prototype.setUrlParam = function (key, value) {
}
}
}
updateUrl(url);
newUrl = url;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment