mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-03 09:20:09 +00:00
Extract onclick handlers to standalone code
This allows to introduce a strict Content-Security-Policy. Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
@@ -32,4 +32,7 @@ function setThemeIcon(theme) {
|
||||
setThemeToDOM(getSavedTheme());
|
||||
|
||||
// Apply theme when the page loads
|
||||
document.addEventListener('DOMContentLoaded', () => setThemeIcon(getSavedTheme()));
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setThemeIcon(getSavedTheme())
|
||||
document.querySelector('button#theme-toggle')?.addEventListener('click', () => toggleTheme());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user