Change message on us.en
[plack-app-gruntmaster.git] / js / 90-themes.js
CommitLineData
c7a5e4e0
MG
1(function(){
2 'use strict';
3 function set_style(name){
d53c616a
MG
4 $('link[rel~="stylesheet"]').prop('disabled', true);
5 $('link[title="' + name + '"]').prop('disabled', false);
c7a5e4e0
MG
6 localStorage.setItem("theme", name);
7 }
7dc32473 8
c7a5e4e0 9 $( document ).ready(function() {
5fdcdc91 10 $('#theme-selector').detach().prependTo($('#sidebar'));
c7a5e4e0 11 $('#theme_slate' ).on('click', function () { set_style("slate"); });
c7a5e4e0 12 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
a96f684c 13 $('#theme_readable').on('click', function () { set_style("readable"); });
7dc32473
MG
14 });
15
c7a5e4e0
MG
16 var theme = localStorage.getItem("theme");
17 if(theme) {
a96f684c
MG
18 if(theme == "cerulean" || theme == "cosmo")
19 theme = "readable";
c7a5e4e0
MG
20 set_style(theme);
21 }
22})();
This page took 0.018479 seconds and 4 git commands to generate.