Update performance

This commit is contained in:
tarikjaber
2023-03-04 00:14:37 -05:00
parent e5649b50ae
commit 9a0034e61e
4 changed files with 13 additions and 5 deletions

View File

@@ -12,6 +12,12 @@ let selectedTheme = localStorage.getItem('theme') || 'github-dark';
let codeText = localStorage.getItem('code') || 'console.log("Hello World")';
// Set up the initial state
document.addEventListener('securitypolicyviolation', function (event) {
if (event.violatedDirective === 'expect-ct') {
event.preventDefault();
}
});
themeStylesheet.setAttribute('href', getStylesheet(selectedTheme));
themeSelector.value = selectedTheme;
code.classList.add('hljs', `language-${selectedLanguage}`);