path specific cookies

This commit is contained in:
Kasper Rynning-Tønnesen
2015-11-23 23:21:36 +01:00
parent a6bd76d641
commit 670f6732b6
2 changed files with 10 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -51,8 +51,10 @@ var Crypt = {
var CookieDate = new Date; var CookieDate = new Date;
CookieDate.setFullYear(CookieDate.getFullYear( ) +1); CookieDate.setFullYear(CookieDate.getFullYear( ) +1);
if(cookie != "_opt") add = chan.toLowerCase();
document.cookie = cookie+"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/;" else add = ";"
console.log(add);
document.cookie = cookie+"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/"+add
}, },
get_volume: function(){ get_volume: function(){
@@ -84,7 +86,10 @@ var Crypt = {
var CookieDate = new Date; var CookieDate = new Date;
CookieDate.setFullYear(CookieDate.getFullYear( ) +1); CookieDate.setFullYear(CookieDate.getFullYear( ) +1);
document.cookie = name+"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/;" if(name != "_opt") add = chan.toLowerCase();
else add = ";"
document.cookie = name+"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/"+add
//document.cookie = name+"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/;"
//document.cookie = na"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/;" //document.cookie = na"="+encrypted.toString()+";expires="+CookieDate.toGMTString()+";path=/;"
return Crypt.getCookie(name); return Crypt.getCookie(name);
}, },