inject: dom optimizer (wip)

This commit is contained in:
Ducko 2023-04-02 22:29:39 +01:00
parent ac0ad4d48a
commit 28e8ed4a60

View file

@ -67,3 +67,12 @@ setInterval(() => { // Try init themesync
} catch (e) { }
}, 10000);
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);
};