From 8cf30848b351ba17aac183792561373b6b4059df Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sun, 28 Jan 2024 09:17:21 +0100 Subject: Updated 11 files, added 2 files and deleted client/icons/canvas.svg (automated) --- client/icons/back.svg | 4 +- client/icons/canvas.svg | 1 - client/icons/chat.svg | 4 +- client/icons/dismiss.svg | 4 +- client/icons/forward.svg | 4 +- client/icons/home.svg | 4 +- client/icons/new.svg | 5 +- client/icons/placeholder.svg | 4 +- client/icons/reload.svg | 5 +- client/icons/shield-off.svg | 3 + client/icons/shield-on.svg | 3 + client/icons/stop.svg | 4 +- client/index.html | 65 ++++++++++++++---- client/main.js | 157 ++++++++++++++++++++++++++++++++++++++++++- 14 files changed, 240 insertions(+), 27 deletions(-) delete mode 100644 client/icons/canvas.svg create mode 100644 client/icons/shield-off.svg create mode 100644 client/icons/shield-on.svg diff --git a/client/icons/back.svg b/client/icons/back.svg index 22c19e6..587d4fe 100644 --- a/client/icons/back.svg +++ b/client/icons/back.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/icons/canvas.svg b/client/icons/canvas.svg deleted file mode 100644 index 5247dd2..0000000 --- a/client/icons/canvas.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/icons/chat.svg b/client/icons/chat.svg index 1b2deb2..487d142 100644 --- a/client/icons/chat.svg +++ b/client/icons/chat.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/icons/dismiss.svg b/client/icons/dismiss.svg index c4b81e1..b689cbb 100644 --- a/client/icons/dismiss.svg +++ b/client/icons/dismiss.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/icons/forward.svg b/client/icons/forward.svg index 65b7014..2362904 100644 --- a/client/icons/forward.svg +++ b/client/icons/forward.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/icons/home.svg b/client/icons/home.svg index b86dbc7..daa093b 100644 --- a/client/icons/home.svg +++ b/client/icons/home.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/icons/new.svg b/client/icons/new.svg index 3733980..2832373 100644 --- a/client/icons/new.svg +++ b/client/icons/new.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/client/icons/placeholder.svg b/client/icons/placeholder.svg index 453323c..835ff66 100644 --- a/client/icons/placeholder.svg +++ b/client/icons/placeholder.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/icons/reload.svg b/client/icons/reload.svg index 5247905..324d5af 100644 --- a/client/icons/reload.svg +++ b/client/icons/reload.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + \ No newline at end of file diff --git a/client/icons/shield-off.svg b/client/icons/shield-off.svg new file mode 100644 index 0000000..abc01b1 --- /dev/null +++ b/client/icons/shield-off.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/client/icons/shield-on.svg b/client/icons/shield-on.svg new file mode 100644 index 0000000..7e18d1b --- /dev/null +++ b/client/icons/shield-on.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/client/icons/stop.svg b/client/icons/stop.svg index c4b81e1..b689cbb 100644 --- a/client/icons/stop.svg +++ b/client/icons/stop.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/client/index.html b/client/index.html index 1ebd8e8..a0661a9 100644 --- a/client/index.html +++ b/client/index.html @@ -56,9 +56,25 @@ .nav-item:not(.active):hover .nav-link { border-color: transparent !important; } + + @media (prefers-color-scheme: dark) { + #tabs, .bar { + background-color: #ddd; + filter: invert(1) hue-rotate(180deg); + } + + .nav-link.active { + background-color: #ddd !important; + border-bottom: none !important; + } + + img:not([src$=".svg"]) { + filter: invert(1) hue-rotate(180deg); + } + } - + + + +
+ +
+
+ + + + + + +
+

Starting...

+
+
+ + +`); +} catch (e) { + console.error(e); +} + const { ElectronBlocker } = require('@cliqz/adblocker-electron'); const { fetch } = require('cross-fetch'); ElectronBlocker.fromPrebuiltAdsAndTracking(fetch).then((blocker) => { - blocker.enableBlockingInSession(session.defaultSession); + global.blocker = blocker; +}); + +ipcMain.on('enable-protection', () => { + global.blocker.enableBlockingInSession(session.defaultSession); +}); + +ipcMain.on('disable-protection', () => { + global.blocker.disableBlockingInSession(session.defaultSession); }); -session.defaultSession.setUserAgent(session.defaultSession.getUserAgent().replace(/(.*)( Electron\/(.*) )/gm, "$1 ") + " Chatroom/1.0.0") +session.defaultSession.setUserAgent(session.defaultSession.getUserAgent().replace(/(.*)( Electron\/(.*) )/gm, "$1 ") + " Chatroom/1.0.0"); let localchatDataRoot = (os.platform() === "win32" ? os.homedir() + "/AppData/Roaming" : (os.platform() === "darwin" ? os.homedir() + "/Library/Application Support" : os.homedir())) + (os.platform() === "darwin" ? "/ChatroomWorkspace" : "/.chatroom-workspace"); -- cgit