addresses #2518: Rework disabled blacklist cookies

This commit is contained in:
r888888888
2015-10-06 15:20:50 -07:00
parent 721a8eda29
commit 49b8f6ca43
2 changed files with 16 additions and 9 deletions

View File

@@ -13,7 +13,14 @@
expires = "expires=" + date.toGMTString() + "; ";
}
document.cookie = name + "=" + encodeURIComponent(value) + "; " + expires + "path=/";
var new_val = name + "=" + encodeURIComponent(value) + "; " + expires + "path=/";
if (document.cookie.length < (4090 - new_val.length)) {
document.cookie = new_val;
return true;
} else {
Danbooru.error("You have too many cookies on this site. Consider deleting them all.")
return false;
}
}
Danbooru.Cookie.raw_get = function(name) {