schoolbox web extension :)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(themes): hot reload not working when disabled -> enabled

willow 73dc66df 0cbf0236

+6 -7
+6 -7
src/entrypoints/start.content.ts
··· 53 53 const injectThemes = () => injectStylesheet(browser.runtime.getURL(cssUrl), "themes"); 54 54 const uninjectThemes = () => uninjectStylesheet("themes"); 55 55 56 + // storage listeners for hot reload 57 + globalSettings.storage.watch((newValue, oldValue) => { 58 + updateThemes(newValue, oldValue); 59 + updateUserSnippets(newValue, oldValue); 60 + }); 61 + 56 62 if (settings.global && urls.includes(window.location.origin)) { 57 63 // inject themes 58 64 if (settings.themes) { ··· 75 81 76 82 // update icon 77 83 browser.runtime.sendMessage({ updateIcon: true }); 78 - 79 - // storage listeners for hot reload 80 - // if global is toggled, inject or uninject theme and snippets 81 - globalSettings.storage.watch((newValue, oldValue) => { 82 - updateThemes(newValue, oldValue); 83 - updateUserSnippets(newValue, oldValue); 84 - }); 85 84 } 86 85 }, 87 86 });