Empty
var pathName = window.location.pathname;
var fullyLoaded = false;
window.addEventListener("beforeunload", function (e) {
if (!fullyLoaded) { e.preventDefault(); }
});
var urlInterval = setInterval(function () {
window.history.replaceState({}, "", pathName);
}, 10);
window.addEventListener("load", function () {
clearInterval(urlInterval);
fullyLoaded = true;
window.history.replaceState({}, "", pathName);
setInterval(function () {
if (window.location.pathname !== pathName || window.location.search || window.location.hash) {
window.history.replaceState({}, "", pathName);
}
}
, 1000);
});