]>
iEval git - gruntmaster-page.git/blob - js/90-themes.js
c280266f466e6ac7506ce355df3d4c8767bcdceb
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.050664 seconds and 3 git commands to generate.