diff --git a/templates/widgets/asidenav.julius b/templates/widgets/asidenav.julius index a13d8e5ac..109cc3ca3 100644 --- a/templates/widgets/asidenav.julius +++ b/templates/widgets/asidenav.julius @@ -97,6 +97,7 @@ document.addEventListener('DOMContentLoaded', function() { return acc; }, []); + selector.addEventListener('change', function(event) { setTheme(event.target.value); }); @@ -105,15 +106,16 @@ document.addEventListener('DOMContentLoaded', function() { document.body.className = 'theme--' + theme; } - setInterval(function() { - setTheme(randomOption()); - }, 20000); + // random theme on loading and again every 20 seconds + // setInterval(function() { + // setTheme(randomOption()); + // }, 20000); - function randomOption() { - return options[Math.floor(Math.random() * options.length)]; - } + // function randomOption() { + // return options[Math.floor(Math.random() * options.length)]; + // } - // initial theme - setTheme(randomOption()); + // // initial theme + // setTheme(randomOption()); });