X-Git-Url: http://git.ieval.ro/?p=plack-app-gruntmaster.git;a=blobdiff_plain;f=js%2F90-themes.js;h=a9d9b5185ebf5f1bd905dffc0767b46841b7bf4e;hp=aa2cdc903ca6ffd9a576a90f18fe937850903676;hb=65d5cb3b6007fa0bc758722983b3f0afefc02f2e;hpb=8e3f7d1e659c971fe718b6dccd0b904ed2c0d35a
diff --git a/js/90-themes.js b/js/90-themes.js
index aa2cdc9..a9d9b51 100644
--- a/js/90-themes.js
+++ b/js/90-themes.js
@@ -9,18 +9,15 @@ function set_style(name, trans){
}
$(function() {
- var theme_ul = '
' +
+ const theme_ul = '';
- var sidebar = $('#sidebar')[0];
+ const sidebar = $('#sidebar')[0];
sidebar.insertBefore(m(theme_ul), sidebar.firstChild);
$('#themes a').on('click', e => set_style(e.target.dataset.theme, true));
});
-let theme = localStorage.getItem("theme");
-if(theme) {
- if(theme == "cerulean" || theme == "cosmo")
- theme = "readable";
- set_style(theme, false);
-}
+const theme = localStorage.getItem("theme");
+if(theme)
+ set_style(theme == "cerulean" || theme == "cosmo" ? "readable" : theme, false);