]> git.wh0rd.org - chrome-ext/web-power-switch.git/blob - theme-init.js
fix dark theme
[chrome-ext/web-power-switch.git] / theme-init.js
1 // Written by Mike Frysinger <vapier@gmail.com>. Released into the public domain.
2
3 // Load the theme override asap to help with initial loading/flashing.
4 chrome.storage.sync.get(['theme'], ({theme}) => {
5 if (theme == 'light' || theme == 'dark') {
6 const css = document.querySelector('link#theme-override');
7 css.href = `css/${theme}.css`;
8 }
9 });