From: Marius Gavrilescu Date: Thu, 6 Aug 2015 09:47:38 +0000 (+0300) Subject: Do not change theme when new theme == current theme X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=931541d7b6017217b1a9a9a08d78f9783128621e;p=plack-app-gruntmaster.git Do not change theme when new theme == current theme --- diff --git a/js/90-themes.js b/js/90-themes.js index a94d130..d65759c 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -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); }