LinkStack/assets/js/detect-dark-mode.js
Julian Prieber 5dbb2b182d Version 4.0
-- Dashboard Update --

Update to version 4.0.0.
Complete redesign of the admin panel.
New features and a license change.
2023-04-26 15:44:39 +02:00

9 lines
319 B
JavaScript
Vendored

// Retrieve the value of the 'color-mode' key from local storage
var colorMode = localStorage.getItem('color-mode');
// Check if the value is valid and set it to 'auto' if not
if (!colorMode || (colorMode !== 'light' && colorMode !== 'dark')) {
colorMode = 'auto';
localStorage.setItem('color-mode', colorMode);
}