mirror of
https://github.com/NohamR/Code-to-PDF.git
synced 2026-05-25 12:17:14 +00:00
Update performance
This commit is contained in:
6
index.js
6
index.js
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user