Improve performance

This commit is contained in:
tarikjaber
2023-03-04 00:26:15 -05:00
parent 9a0034e61e
commit 4106d9585d
2 changed files with 2 additions and 8 deletions

View File

@@ -12,12 +12,6 @@ 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}`);