[READ-ONLY] Mirror of https://github.com/probablykasper/taskler. Simple text editor for your New Tab page taskler.kasper.space
browser-extension chrome chrome-extension editor extension firefox firefox-addon firefox-extension notes
0

Configure Feed

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

Fix theme loading

+21 -17
+3
CHANGELOG.md
··· 1 1 # Changelog 2 2 3 + ## Next 4 + - Fix theme loading in web extension 5 + 3 6 ## 2.2.1 - 2022 Sep 25 4 7 - Faster theme initialization 5 8
+3 -2
README.md
··· 34 34 npm run build:extension 35 35 ``` 36 36 3. Commit with a tag in format "v#.#.#" 37 - 4. Merge `dev` into `prod` to deploy website 38 - 5. Publish to Chrome and Firefox stores 37 + 4. Create GitHub release with the extension zip and release notes 38 + 5. Merge `dev` into `prod` to deploy website 39 + 6. Publish to Chrome and Firefox stores 39 40 40 41 ## Data recovery 41 42 For some reason, Brave deleted all my localStorage data, including Taskler's. This does not seem to be a problem with Taskler. If you have a backup, Taskler's data can be restored. Brave stores localStorage at in the following folder in my case:
+1 -15
src/index.pug
··· 15 15 meta(name="msapplication-TileColor", content="#272727") 16 16 meta(name="msapplication-config", content="/icons/browserconfig.xml?v=2") 17 17 meta(name="theme-color", content="#ffffff") 18 - script. 19 - function detectTheme() { 20 - var themeOverride = localStorage.getItem('theme') 21 - if (themeOverride == 'dark' || themeOverride === 'light') { 22 - // Override the system theme 23 - return themeOverride 24 - } else if (window.matchMedia('(prefers-color-scheme: light)').matches) { 25 - // Use the system theme 26 - return 'light' 27 - } else { 28 - // Default theme 29 - return 'dark' 30 - } 31 - } 32 - document.documentElement.setAttribute('data-theme', detectTheme()) 33 18 body.no-transition(data-build-as=String(buildAs)) 19 + script(src='./theme-init.ts') 34 20 //- .bg 35 21 //- #toolbar-container(style='display:none') 36 22 .center
+14
src/theme-init.ts
··· 1 + function detectTheme() { 2 + var themeOverride = localStorage.getItem('theme') 3 + if (themeOverride === 'dark' || themeOverride === 'light') { 4 + // Override the system theme 5 + return themeOverride 6 + } else if (window.matchMedia('(prefers-color-scheme: light)').matches) { 7 + // Use the system theme 8 + return 'light' 9 + } else { 10 + // Default theme 11 + return 'dark' 12 + } 13 + } 14 + document.documentElement.setAttribute('data-theme', detectTheme())