Refactoring controls.js and add url observer like main.js file

This commit is contained in:
Matvey Tarasov
2020-04-15 00:37:01 +03:00
parent 928984c158
commit 708cb72028
4 changed files with 160 additions and 113 deletions

9
main.js Normal file
View File

@@ -0,0 +1,9 @@
const changeUrlDetect = setInterval((function () {
let oldUrl = '';
return function () {
const currentUrl = window.location.href;
if(currentUrl !== oldUrl){
oldUrl = currentUrl;
}
}
})(),100);