From aed4fa2bffacac41e112d49e9445a0f238759256 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 6 Nov 2024 16:42:45 +0100 Subject: [PATCH] svg update on media change --- static/js/cours.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/cours.js b/static/js/cours.js index 7da4a7e..e4ebff3 100644 --- a/static/js/cours.js +++ b/static/js/cours.js @@ -165,3 +165,8 @@ window.addEventListener("load", () => { svgDarkTheme(); } }); + +// Is this working? +window + .matchMedia("(prefers-color-scheme: dark)") + .addEventListener("change", svgDarkTheme);