]>
iEval git - gruntmaster-page.git/blob - js/90-themes.js
1 function set_style(name
){
2 $('link[title]').each(e
=> e
.disabled
= true);
3 $('link[title="' + name
+ '"]')[0].disabled
= false;
4 localStorage
.setItem("theme", name
);
8 var theme_ul
= '<ul class="list-inline" id="themes">' +
9 '<li><a role="button" data-theme="cyborg">Black</a>' +
10 '<li><a role="button" data-theme="slate">Grey</a>' +
11 '<li><a role="button" data-theme="readable">White</a></ul>';
12 var sidebar
= $('#sidebar')[0];
13 sidebar
.insertBefore(m(theme_ul
), sidebar
.firstChild
);
14 $('#themes a').on('click', e
=> set_style(e
.target
.dataset
.theme
));
17 let theme
= localStorage
.getItem("theme");
19 if(theme
== "cerulean" || theme
== "cosmo")
This page took 0.04845 seconds and 4 git commands to generate.