projects
/
mindcoding-template-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1e38ff
)
Make theme chooser rememeber theme
author
Marius Gavrilescu
<marius@ieval.ro>
Mon, 27 Jan 2014 23:18:26 +0000
(
01:18
+0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Mon, 27 Jan 2014 23:18:26 +0000
(
01:18
+0200)
js/scripts.js
patch
|
blob
|
blame
|
history
diff --git
a/js/scripts.js
b/js/scripts.js
index 5ba7ecd937a64bd461105813e6f857acc70318ed..c7f0025400b482b23aa190884509bbeb0322928b 100644
(file)
--- a/
js/scripts.js
+++ b/
js/scripts.js
@@
-1,5
+1,6
@@
function set_style(name){
$('#stylesheet').attr("href", "/css/" + name + ".var");
+ localStorage.setItem("theme", name);
}
$( document ).ready(function() {
@@
-25,3
+26,6
@@
$( document ).ready(function() {
$('#theme_cerulean').on('click', function () { set_style("cerulean"); });
$('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
});
+
+if(localStorage.getItem("theme"))
+ set_style(localStorage.getItem("theme"));
This page took
0.010632 seconds
and
4
git commands to generate.