From 38c91032f3fe3a01401d9ae8777e0611be029fc8 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 1 Apr 2024 17:55:51 +0200 Subject: [PATCH] fix svg --- static/js/cours.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/cours.js b/static/js/cours.js index abc754a..7da4a7e 100644 --- a/static/js/cours.js +++ b/static/js/cours.js @@ -160,6 +160,8 @@ window.addEventListener("load", () => { uncollapse(last_openeded); } - // Fix SVG images - svgDarkTheme(); + // Fix SVG images in dark mode + if (window.matchMedia("(prefers-color-scheme: dark)").matches) { + svgDarkTheme(); + } });