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