summaryrefslogtreecommitdiff
path: root/assets/js/theme-switcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/theme-switcher.js')
-rw-r--r--assets/js/theme-switcher.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/assets/js/theme-switcher.js b/assets/js/theme-switcher.js
index 0cca832..f2e58f6 100644
--- a/assets/js/theme-switcher.js
+++ b/assets/js/theme-switcher.js
@@ -91,11 +91,9 @@ const themeSwitcher = {
},
};
-window.addEventListener('load', function () {
- themeSwitcher.addButton({
- tag: 'BUTTON',
- class: 'contrast switcher theme-switcher',
- target: 'body',
- });
- themeSwitcher.init();
+themeSwitcher.addButton({
+ tag: 'BUTTON',
+ class: 'contrast switcher theme-switcher',
+ target: 'body',
});
+themeSwitcher.init();