]>
Commit | Line | Data |
---|---|---|
68553004 MF |
1 | // Load the theme override asap to help with initial loading/flashing. |
2 | function switchTheme(theme) { | |
3 | const css = document.querySelector('link#theme-override'); | |
4 | if (theme == 'light' || theme == 'dark') { | |
5 | css.href = `${theme}.css`; | |
6 | } else { | |
7 | css.href = ''; | |
8 | } | |
9 | } | |
d9e77fbf MF |
10 | chrome.storage.local.get(function(items) { |
11 | switchTheme(items.prefs_theme); | |
12 | }); |