Do not change theme when new theme == current theme
[plack-app-gruntmaster.git] / js / 90-themes.js
index a94d1300d9434140fc60004ea80eff1a09fb30fe..d65759c8e058646f608d8a10eb03603d63d34703 100644 (file)
@@ -3,6 +3,8 @@ function set_style(name, trans){
                document.body.classList.add('transition-color');
                setTimeout(() => document.body.classList.remove('transition-color'), 1000);
        }
+       if(q('html').className == name)
+               return;
        q('html').className = name;
        localStorage.setItem("theme", name);
 }
This page took 0.009631 seconds and 4 git commands to generate.