MCPcopy
hub / github.com/MALSync/MALSync / urlChangeDetect

Function urlChangeDetect

src/utils/general.ts:103–111  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

101}
102
103export function urlChangeDetect(callback) {
104 let currentPage = window.location.href;
105 return setInterval(function () {
106 if (currentPage !== window.location.href) {
107 currentPage = window.location.href;
108 callback();
109 }
110 }, 100);
111}
112
113export function fullUrlChangeDetect(callback, strip = false) {
114 let currentPage = '';

Callers 1

initFunction · 0.90

Calls 1

callbackClass · 0.50

Tested by

no test coverage detected