diff --git a/src/bootstrap.js b/src/bootstrap.js index 2086f52..ad95b31 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -42,6 +42,7 @@ const startCore = () => { bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8') .replaceAll('', hash).replaceAll('', channel) .replaceAll('', oaConfig.noTrack !== false) + .replaceAll('', oaConfig.domOptimizer !== false) .replace('', (oaConfig.css ?? '').replaceAll('\\', '\\\\').replaceAll('`', '\\`'))); if (oaConfig.js) bw.webContents.executeJavaScript(oaConfig.js); diff --git a/src/mainWindow.js b/src/mainWindow.js index a1f6a8c..2c677c4 100644 --- a/src/mainWindow.js +++ b/src/mainWindow.js @@ -79,5 +79,7 @@ const optimize = orig => function(...args) { return orig.apply(this, args); }; -Element.prototype.removeChild = optimize(Element.prototype.removeChild); -// Element.prototype.appendChild = optimize(Element.prototype.appendChild); \ No newline at end of file +if ('' === 'true') { + Element.prototype.removeChild = optimize(Element.prototype.removeChild); + // Element.prototype.appendChild = optimize(Element.prototype.appendChild); +} \ No newline at end of file