Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 17c0644e authored by Michael J. Ryan's avatar Michael J. Ryan

Update common.js

When the property was changed, it now blows up on any browser with the previous configuration schema, explicitly checking for the expected text value without parsing.
parent 6015652c
Pipeline #1379 passed with stage
in 9 minutes and 32 seconds
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment