More informations about installed cookies

This commit is contained in:
1002Studio 2015-01-11 02:03:22 +01:00
parent f8e806cd2c
commit c8ce5f9965
4 changed files with 32 additions and 32 deletions

View File

@ -238,16 +238,6 @@
font-size: 12px;
}
#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies b {
color: darkgreen;
font-size: 12px;
}
#tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies s {
color: gray;
font-size: 12px;
}
#tarteaucitron #tarteaucitronFooter {
background: #f2f2f2;
border-top: 1px solid #eee;

View File

@ -9,13 +9,14 @@ tarteaucitron.lang = {
"all": "Preference for all services",
"info": "Transparency about cookies",
"info": "Protecting your privacy",
"disclaimer": "By allowing these third party services, you accept theirs cookies and the use of tracking technologies necessary for their proper functioning.",
"allow": "Allow",
"deny": "Deny",
"noCookie": "This service does not use cookie to work.",
"noCookie": "This service does not use cookie.",
"useCookie": "This service can install",
"useCookieCurrent": "on this browser",
"useCookieCurrent": "This service has installed",
"useNoCookie": "This service has not installed any cookie.",
"more": "Read more",
"source": "View the official website",
"credit": "Cookies manager by tarteaucitron.js",

View File

@ -9,13 +9,14 @@ tarteaucitron.lang = {
"all": "Préférence pour tous les services",
"info": "Transparence sur les cookies",
"info": "Protection de votre vie privée",
"disclaimer": "En autorisant ces services tiers, vous acceptez le dépôt et la lecture de cookies et l'utilisation de technologies de suivi nécessaires à leur bon fonctionnement.",
"allow": "Autoriser",
"deny": "Interdire",
"noCookie": "Ce service ne dépose aucun cookie pour fonctionner.",
"noCookie": "Ce service ne dépose aucun cookie.",
"useCookie": "Ce service peut déposer",
"useCookieCurrent": "sur ce navigateur",
"useCookieCurrent": "Ce service a déposé",
"useNoCookie": "Ce service n'a déposé aucun cookie.",
"more": "En savoir plus",
"source": "Voir le site officiel",
"credit": "Gestion des cookies par tarteaucitron.js",

View File

@ -463,27 +463,35 @@ var tarteaucitron = {
nb = arr.length,
nbCurrent = 0,
html = '',
htmlPlus = '',
i;
i,
status = document.cookie.indexOf(key + '=true');
if (nb > 0) {
if (status >= 0 && nb === 0) {
html += tarteaucitron.lang.useNoCookie;
} else if (status >= 0) {
for (i = 0; i < nb; i += 1) {
if (document.cookie.indexOf(arr[i] + '=') !== -1) {
nbCurrent += 1;
}
}
if (nbCurrent > 0) {
html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie';
if (nbCurrent > 1) {
html += 's';
}
html += '.';
} else {
html += tarteaucitron.lang.useNoCookie;
}
} else if (nb === 0) {
html = tarteaucitron.lang.noCookie;
} else {
html += tarteaucitron.lang.useCookie + ' ' + nb + ' cookie';
if (nb > 1) {
html += 's';
}
for (i = 0; i < nb; i += 1) {
if (document.cookie.indexOf(arr[i] + '=') !== -1) {
htmlPlus += '<b>' + arr[i] + '</b> ';
nbCurrent += 1;
} else {
htmlPlus += '<s>' + arr[i] + '</s> ';
}
}
html += ' (' + nbCurrent + ' ' + tarteaucitron.lang.useCookieCurrent + ')<br/>' + htmlPlus;
} else {
html += tarteaucitron.lang.noCookie;
html += '.';
}
document.getElementById('tacCL' + key).innerHTML = html;