projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Saving state (unfinished styling on variant page)
[vchess.git]
/
public
/
javascripts
/
utils
/
misc.js
diff --git
a/public/javascripts/utils/misc.js
b/public/javascripts/utils/misc.js
index
f2927c3
..
d72e3ce
100644
(file)
--- a/
public/javascripts/utils/misc.js
+++ b/
public/javascripts/utils/misc.js
@@
-27,3
+27,11
@@
function getRandString()
return (Date.now().toString(36) + Math.random().toString(36).substr(2, 7))
.toUpperCase();
}
return (Date.now().toString(36) + Math.random().toString(36).substr(2, 7))
.toUpperCase();
}
+
+// Used both on index and variant page, to switch language
+function setLanguage(e)
+{
+ console.log(e);
+ setCookie("lang", e.target.value);
+ location.reload(); //to include the right .pug file
+}