diff options
Diffstat (limited to 'app/views/layouts')
| -rw-r--r-- | app/views/layouts/application.html.erb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4a71011b..756b4bdd 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb | |||
| @@ -22,8 +22,10 @@ | |||
| 22 | 22 | ||
| 23 | <%= javascript_tag nonce: true do %> | 23 | <%= javascript_tag nonce: true do %> |
| 24 | document.addEventListener("DOMContentLoaded", function() { | 24 | document.addEventListener("DOMContentLoaded", function() { |
| 25 | if (localStorage.getItem('override-prefers-color-scheme')) | 25 | try { |
| 26 | document.getElementById("light-mode").checked = true; | 26 | if (localStorage.getItem('override-prefers-color-scheme')) |
| 27 | document.getElementById("light-mode").checked = true; | ||
| 28 | } catch (e) {} | ||
| 27 | }); | 29 | }); |
| 28 | <% end %> | 30 | <% end %> |
| 29 | 31 | ||
