commit 3f77da47dedf0cf0d12304e0aa3a2eb2f9a4335b parent 0949aa8724013a7e9393df620346777c4fca46cb Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Sun, 19 May 2024 20:56:53 +0200 Add darkmode for chat embed Diffstat:
M | assets/js/twitch.js | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/assets/js/twitch.js b/assets/js/twitch.js @@ -42,6 +42,10 @@ function toggle_chat(stream) { stream + "/chat?parent=" + window.location.hostname; + // Check for dark mode + if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { + chatembed.src = chatembed.src + "&darkpopout"; + } chatembed.id = "chat-" + stream; plho.replaceWith(chatembed); }