inject: dom optimizer (wip)
This commit is contained in:
parent
ac0ad4d48a
commit
28e8ed4a60
1 changed files with 10 additions and 1 deletions
|
@ -66,4 +66,13 @@ setInterval(() => { // Try init themesync
|
||||||
themesync();
|
themesync();
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
}, 10000);
|
}, 10000);
|
||||||
themesync();
|
themesync();
|
||||||
|
|
||||||
|
// DOM Optimizer - see docs (todo)
|
||||||
|
const removeOrig = Element.prototype.removeChild;
|
||||||
|
Element.prototype.removeChild = function(...args) {
|
||||||
|
if (typeof args[0].className === 'string' && (args[0].className.indexOf('activity') !== -1))
|
||||||
|
return setTimeout(() => removeOrig.apply(this, args), 100);
|
||||||
|
|
||||||
|
return removeOrig.apply(this, args);
|
||||||
|
};
|
Loading…
Reference in a new issue