From 5dada52da593118a166633f03df40ed92886b53d Mon Sep 17 00:00:00 2001 From: Sneed Group Holder Date: Thu, 21 Nov 2024 13:55:06 -0600 Subject: [PATCH] begin work on big rewrite --- main.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index e73de3c..9c0c8da 100644 --- a/main.js +++ b/main.js @@ -13,9 +13,8 @@ ipcMain.on('windowmaker', (event, arg) => { const proxy = createProxy(http.createServer()); proxy.listen(3129) -//Function to enable AD Blocking and extensions... +//Function to enable AD Blocking... let blocker = undefined -let extensions = undefined async function enableGoodies(s) { blocker = await ElectronBlocker.fromLists(fetch, [ 'https://easylist.to/easylist/easylist.txt', @@ -26,9 +25,6 @@ async function enableGoodies(s) { 'https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/pro.plus.txt' ]) blocker.enableBlockingInSession(s); - extensions = new ElectronChromeExtensions({ - session: s - }) } // 0.0.0.0 day fix @@ -43,6 +39,7 @@ function isLocal(url) { function createWindow () { + const extensions = new ElectronChromeExtensions() const mainWindow = new BrowserWindow({ width: 1100, height: 600, @@ -58,7 +55,7 @@ function createWindow () { } }) - mainWindow.removeMenu() + extensions.addTab(browserWindow.webContents, browserWindow) mainWindow.setMinimumSize(1000, 300)