1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Added getCookie()

This commit is contained in:
billz 2019-10-20 18:26:25 +01:00
parent 7c5bb27902
commit 01e80c7109

View File

@ -246,6 +246,12 @@ function setCookie(cname, cvalue, exdays) {
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
var regx = new RegExp(cname + "=([^;]+)");
var value = regx.exec(document.cookie);
return (value != null) ? unescape(value[1]) : null;
}
var themes = {
"default": "custom.css",
"hackernews" : "hackernews.css",