diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
| commit | 9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch) | |
| tree | 8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /public/javascripts/public.js | |
| parent | 85a01e35274b8d4d4165a7b26bd7986e211246bb (diff) | |
| parent | 1853082fcd8c067390c246f9daa01a9b47387497 (diff) | |
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'public/javascripts/public.js')
| -rw-r--r-- | public/javascripts/public.js | 9 |
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 | }; |
