2018-11-23 23:46:40 +00:00
|
|
|
const getCookie = (cname) => {
|
|
|
|
let decodedCookie = decodeURIComponent(document.cookie);
|
|
|
|
let name = cname + "=";
|
|
|
|
let ca = decodedCookie.split(';');
|
|
|
|
for(let i = 0; i <ca.length; i++) {
|
|
|
|
let c = ca[i];
|
2018-04-23 01:43:19 +00:00
|
|
|
while (c.charAt(0) == ' ') {
|
|
|
|
c = c.substring(1);
|
|
|
|
}
|
|
|
|
if (c.indexOf(name) == 0) {
|
|
|
|
return c.substring(name.length, c.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return "";
|
|
|
|
}
|