diff options
Diffstat (limited to 'shtml/initScripts.shtml')
-rw-r--r-- | shtml/initScripts.shtml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/shtml/initScripts.shtml b/shtml/initScripts.shtml index 77f8afd..d4955f3 100644 --- a/shtml/initScripts.shtml +++ b/shtml/initScripts.shtml @@ -1,5 +1,17 @@ <script src="/js/initImages.js" type="text/javascript"></script> +<script src="/js/setTheme.js" type="text/javascript"></script> +<script src="/js/toggleTheme.js" type="text/javascript"></script> <script type="text/javascript"> - initImages(); + (function() { + initImages(); + + let theme = localStorage.getItem("theme"); + + if (!theme) { + theme = "dark"; + } + + setTheme(theme); + })(); </script> |