From 6c90e3940ddb1053e2f705a96edb83d17249e77a Mon Sep 17 00:00:00 2001 From: josselinonduty Date: Mon, 1 Dec 2025 14:15:09 +0100 Subject: [PATCH] feat: disable animations --- build/index.html | 6 ++++++ build/main.js | 3 +++ build/preload.js | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/build/index.html b/build/index.html index 4695231..c2cabd6 100644 --- a/build/index.html +++ b/build/index.html @@ -92,6 +92,12 @@ .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) { display: none !important; } + + /* Disable animations */ + .disable-animations * { + animation: none !important; + transition: none !important; + } diff --git a/build/main.js b/build/main.js index 8953617..69a734d 100644 --- a/build/main.js +++ b/build/main.js @@ -3078,6 +3078,9 @@ (process.argv.some((arg) => arg === "--hide-offline-banner") || "yes" === process.env.DZ_HIDE_OFFLINE_BANNER) && "--hide-offline-banner", + (process.argv.some((arg) => arg === "--disable-animations") || + "yes" === process.env.DZ_DISABLE_ANIMATIONS) && + "--disable-animations", ].filter(Boolean), }, windowOptions = { diff --git a/build/preload.js b/build/preload.js index 80dced7..4f72387 100644 --- a/build/preload.js +++ b/build/preload.js @@ -531,6 +531,10 @@ document .getElementsByTagName("body")[0] .classList.add("hide-offline-banner"); + if (process.argv.some((arg) => arg === "--disable-animations")) + document + .getElementsByTagName("body")[0] + .classList.add("disable-animations"); }), (module.exports = {}); })(); -- 2.48.1