Check if cookie exist before purge
This commit is contained in:
parent
e762602f12
commit
d3b6f63e5b
|
|
@ -1534,10 +1534,14 @@ var tarteaucitron = {
|
|||
var i;
|
||||
|
||||
for (i = 0; i < arr.length; i += 1) {
|
||||
|
||||
var rgxpCookie = new RegExp("^(.*;)?\\s*" + arr[i] + "\\s*=\\s*[^;]+(.*)?$");
|
||||
if (document.cookie.match(rgxpCookie)) {
|
||||
document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
|
||||
document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
|
||||
document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
|
||||
}
|
||||
}
|
||||
},
|
||||
"checkCount": function (key) {
|
||||
"use strict";
|
||||
|
|
|
|||
Loading…
Reference in New Issue