summaryrefslogtreecommitdiff
path: root/public/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/public.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/public/javascripts/public.js b/public/javascripts/public.js
index 0919360..10f04e8 100644
--- a/public/javascripts/public.js
+++ b/public/javascripts/public.js
@@ -18,6 +18,13 @@ $(document).ready(function(){
18 $("div#headline_image a img").bind("click", function(){ 18 $("div#headline_image a img").bind("click", function(){
19 $(".shadowbox_image:first").trigger("click"); 19 $(".shadowbox_image:first").trigger("click");
20 }); 20 });
21
22 document.getElementById("light-mode").addEventListener("change", () => {
23 if (document.getElementById("light-mode").checked)
24 localStorage.setItem("override-prefers-color-scheme", 1);
25 else
26 localStorage.removeItem("override-prefers-color-scheme");
27 });
21}); 28});
22 29
23 30
@@ -38,4 +45,4 @@ var image_handler = {
38 path = path_name.replace(/\/(de|en)*\/*/, ""); 45 path = path_name.replace(/\/(de|en)*\/*/, "");
39 gallery_path = ""; 46 gallery_path = "";
40 } 47 }
41}; \ No newline at end of file 48};