inject: dom optimizer (wip)

This commit is contained in:
Ducko 2023-04-02 22:29:39 +01:00
parent ac0ad4d48a
commit 28e8ed4a60
1 changed files with 10 additions and 1 deletions

View File

@ -66,4 +66,13 @@ setInterval(() => { // Try init themesync
themesync();
} catch (e) { }
}, 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);
};