1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Range selections are now saved in cookies

This commit is contained in:
Krateng
2019-06-17 12:18:19 +02:00
parent 649075286c
commit e6aa0a25c8
7 changed files with 96 additions and 42 deletions

View File

@@ -25,4 +25,21 @@ function showRange(identifier,unit) {
for (var i=0;i<reactivate.length;i++) {
reactivate[i].setAttribute("style","opacity:0.5;")
}
}
function showRangeManual(identifier,unit) {
showRange(identifier,unit);
setCookie("rangeselect_" + identifier,unit);
}
document.addEventListener('DOMContentLoaded',function() {
getCookies();
for (c in cookies) {
if (c.startsWith("rangeselect_")) {
showRange(c.slice(12),cookies[c]);
}
}
})