deezer-linux/patches/10-disable-notifications.patch
2025-12-01 17:30:25 +01:00

41 lines
1.3 KiB
Diff

From 4a08faa677a055d82a2acf1d0ea9273d4cce180a Mon Sep 17 00:00:00 2001
From: josselinonduty <contact@josselinonduty.fr>
Date: Mon, 1 Dec 2025 15:04:30 +0100
Subject: [PATCH] feat(patch): disable notifications
---
build/main.js | 3 +++
build/preload.js | 2 ++
2 files changed, 5 insertions(+)
diff --git a/build/main.js b/build/main.js
index 69a734d..edacdde 100644
--- a/build/main.js
+++ b/build/main.js
@@ -3079,6 +3079,9 @@
(process.argv.some((arg) => arg === "--disable-animations") ||
"yes" === process.env.DZ_DISABLE_ANIMATIONS) &&
"--disable-animations",
+ (process.argv.some((arg) => arg === "--disable-notifications") ||
+ "yes" === process.env.DZ_DISABLE_NOTIFICATIONS) &&
+ "--disable-notifications",
].filter(Boolean),
},
windowOptions = {
diff --git a/build/preload.js b/build/preload.js
index 4f72387..ae2be23 100644
--- a/build/preload.js
+++ b/build/preload.js
@@ -535,6 +535,8 @@
document
.getElementsByTagName("body")[0]
.classList.add("disable-animations");
+ if (process.argv.some((arg) => arg === "--disable-notifications"))
+ delete window.Notification;
}),
(module.exports = {});
})();
--
2.48.1