Skip to content
Snippets Groups Projects
Commit a7589318 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'patch-1' into 'master'

Update common.js

See merge request main/sbbs!112
parents 6015652c 17c0644e
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!112Update common.js
......@@ -91,9 +91,9 @@ function registerEventListener(scope, callback, params) {
}
function darkmodeRequested() {
const ls = JSON.parse(localStorage.getItem('darkSwitch'));
if (ls) return true;
if (ls === false) return false;
const ls = localStorage.getItem('darkSwitch');
if (ls === "true") return true;
if (ls === "false") return false;
if ((window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)) return true;
if ($('#darkSwitch').prop('checked')) return true;
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment