Made URL change check less ressources taking

This commit is contained in:
Pierre HUBERT 2019-05-18 18:28:08 +02:00
parent f600f082f2
commit 07b16c2f7e

View File

@ -547,15 +547,21 @@ window.location.changed = function(e){};
(function() //create a scope so 'location' is not global
{
var m_loc = window.location.href;
setInterval(function()
/*var m_loc = window.location.href;
const doCheckup = function()
{
if(m_loc != window.location.href)
{
m_loc = window.location.href;
window.location.changed(window.location);
}
}, 900);
};*/
window.addEventListener("popstate",
e => window.location.changed(window.location));
})();