From f8e806cd2c671f3c1c3ac6b4fc4294cd0108f947 Mon Sep 17 00:00:00 2001 From: 1002Studio Date: Sat, 10 Jan 2015 15:46:22 +0100 Subject: [PATCH] More informations about installed cookies --- css/tarteaucitron.css | 8 ++++---- lang/tarteaucitron.en.js | 3 +++ lang/tarteaucitron.fr.js | 3 +++ tarteaucitron.js | 24 ++++++++++++++---------- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 26bb328..eb492ea 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -57,7 +57,7 @@ #tarteaucitron a { color: rgb(66, 66, 66); - font-size: 12px; + font-size: 11px; font-style: italic; text-decoration: none; } @@ -235,17 +235,17 @@ #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies { color: #333; - font-size: 11px; + font-size: 12px; } #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies b { color: darkgreen; - font-size: 11px; + font-size: 12px; } #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronName .tarteaucitronListCookies s { color: gray; - font-size: 11px; + font-size: 12px; } #tarteaucitron #tarteaucitronFooter { diff --git a/lang/tarteaucitron.en.js b/lang/tarteaucitron.en.js index 055caa3..68f8dc8 100644 --- a/lang/tarteaucitron.en.js +++ b/lang/tarteaucitron.en.js @@ -13,6 +13,9 @@ tarteaucitron.lang = { "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.", + "useCookie": "This service can install", + "useCookieCurrent": "on this browser", "more": "Read more", "source": "View the official website", "credit": "Cookies manager by tarteaucitron.js", diff --git a/lang/tarteaucitron.fr.js b/lang/tarteaucitron.fr.js index 73391ee..064a5ed 100644 --- a/lang/tarteaucitron.fr.js +++ b/lang/tarteaucitron.fr.js @@ -13,6 +13,9 @@ tarteaucitron.lang = { "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.", + "useCookie": "Ce service peut déposer", + "useCookieCurrent": "sur ce navigateur", "more": "En savoir plus", "source": "Voir le site officiel", "credit": "Gestion des cookies par tarteaucitron.js", diff --git a/tarteaucitron.js b/tarteaucitron.js index 1c7a8ea..8c9cb6f 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -461,27 +461,31 @@ var tarteaucitron = { "use strict"; var arr = tarteaucitron.services[key].cookies, nb = arr.length, - html = nb + ' cookie', + nbCurrent = 0, + html = '', + htmlPlus = '', i; - if (nb > 1) { - html += 's'; - } - if (nb > 0) { - html += ' ['; + 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) { - html += '' + arr[i] + ' '; + htmlPlus += '' + arr[i] + ' '; + nbCurrent += 1; } else { - html += '' + arr[i] + ' '; + htmlPlus += '' + arr[i] + ' '; } } - html += ']'; + html += ' (' + nbCurrent + ' ' + tarteaucitron.lang.useCookieCurrent + ')
' + htmlPlus; + } else { + html += tarteaucitron.lang.noCookie; } - + document.getElementById('tacCL' + key).innerHTML = html; } },