robb0wen / synthwave-vscode

Synthwave inspired colour theme for VS Code 🌅🕶
MIT License
5.16k stars 1.18k forks source link

#169 Rewrite MutationObserver template to check for style injection #170

Closed robb0wen closed 4 years ago

robb0wen commented 4 years ago

VS code changed the boot sequence for theme styles and the previous MutationObserver code wasn't always firing in the correct sequence.

The updated template checks that Synthwave '84 theme is active, and that the theme style tag is present in the DOM. Next it creates a separate observer to watch the style tag for the initial theme injection. Once that fires, it bootstraps Neon Dreams as before.