MCPcopy
hub / github.com/GooseMod/OpenAsar / optimize

Function optimize

src/mainWindow.js:76–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75// DOM Optimizer - https://github.com/GooseMod/OpenAsar/wiki/DOM-Optimizer
76const optimize = orig => function(...args) {
77 if (typeof args[0].className === 'string' && (args[0].className.indexOf('activity') !== -1))
78 return setTimeout(() => orig.apply(this, args), 100);
79
80 return orig.apply(this, args);
81};
82
83if ('<domopt>' === 'true') {
84 Element.prototype.removeChild = optimize(Element.prototype.removeChild);

Callers 1

mainWindow.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected