فهرست منبع

More informations about installed cookies

1002Studio 10 سال پیش
والد
کامیت
c8ce5f9965
4فایلهای تغییر یافته به همراه29 افزوده شده و 29 حذف شده
  1. 0 10
      css/tarteaucitron.css
  2. 4 3
      lang/tarteaucitron.en.js
  3. 4 3
      lang/tarteaucitron.fr.js
  4. 21 13
      tarteaucitron.js

+ 0 - 10
css/tarteaucitron.css

@@ -238,16 +238,6 @@
     font-size: 12px;
     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 {
 #tarteaucitron #tarteaucitronFooter {
     background: #f2f2f2;
     background: #f2f2f2;
     border-top: 1px solid #eee;
     border-top: 1px solid #eee;

+ 4 - 3
lang/tarteaucitron.en.js

@@ -9,13 +9,14 @@ tarteaucitron.lang = {
     
     
     "all": "Preference for all services",
     "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.",
     "disclaimer": "By allowing these third party services, you accept theirs cookies and the use of tracking technologies necessary for their proper functioning.",
     "allow": "Allow",
     "allow": "Allow",
     "deny": "Deny",
     "deny": "Deny",
-    "noCookie": "This service does not use cookie to work.",
+    "noCookie": "This service does not use cookie.",
     "useCookie": "This service can install",
     "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",
     "more": "Read more",
     "source": "View the official website",
     "source": "View the official website",
     "credit": "Cookies manager by tarteaucitron.js",
     "credit": "Cookies manager by tarteaucitron.js",

+ 4 - 3
lang/tarteaucitron.fr.js

@@ -9,13 +9,14 @@ tarteaucitron.lang = {
 
 
     "all": "Préférence pour tous les services",
     "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.",
     "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",
     "allow": "Autoriser",
     "deny": "Interdire",
     "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",
     "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",
     "more": "En savoir plus",
     "source": "Voir le site officiel",
     "source": "Voir le site officiel",
     "credit": "Gestion des cookies par tarteaucitron.js",
     "credit": "Gestion des cookies par tarteaucitron.js",

+ 21 - 13
tarteaucitron.js

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