From b0add3560136e2e9dd77fa790c9e10637f7ac202 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Tue, 19 Oct 2021 21:38:38 +0300 Subject: [PATCH] header --- public/index.html | 93 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 3eb4454..c7740ce 100644 --- a/public/index.html +++ b/public/index.html @@ -49,9 +49,13 @@ let match = e.conditionText.match(/prefers-color-scheme:\s*(light|dark)/i) if (!match) return; e.conditionText = e.conditionText.replace(match[0], (match[1].toLowerCase() == theme ? 'min' : 'max') + '-width: 0') - }) + }); } + document.getElementById('theme-switch').addEventListener('click', () => { + setTheme(document.getElementById('theme-switch').checked ? 'dark' : 'light'); + }) + const search = document.getElementById('album-search'); search.setAttribute('placeholder', placeholders[Math.floor(Math.random() * placeholders.length)]); search.addEventListener('change', async (e) => { @@ -105,6 +109,9 @@ +