From 8404f0896c043179a8fe567558eae27468d6ba39 Mon Sep 17 00:00:00 2001 From: Michael Demetriou Date: Tue, 25 Jun 2019 22:33:58 +0300 Subject: [PATCH] Handle default pad color mode according to `prefers-color-scheme` This just queries the browser whether `prefers-color-scheme` is set and chooses dark mode if needed, and only if the user hasn't manually set a scheme by pushing the button. --- templates/pad.tmpl | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/templates/pad.tmpl b/templates/pad.tmpl index 914d921..0b04e6e 100644 --- a/templates/pad.tmpl +++ b/templates/pad.tmpl @@ -66,26 +66,46 @@