Revert "perf: make root HTML cacheable by dropping per-request CSP nonce"

This reverts commit 522bf6a019.
This commit is contained in:
Linus Rath
2026-04-18 13:10:42 +02:00
parent b8f39198e1
commit 440a4e919a
6 changed files with 42 additions and 17 deletions
-12
View File
@@ -1,12 +0,0 @@
(function () {
try {
var stored = localStorage.getItem('theme-storage');
var theme = stored ? JSON.parse(stored).state.theme : 'system';
var systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
var resolved = theme === 'system' ? systemTheme : theme;
document.documentElement.classList.remove('light', 'dark');
document.documentElement.classList.add(resolved);
} catch (e) {
document.documentElement.classList.add('light');
}
})();