Merge branch 'master' of https://github.com/thomascombe/tarteaucitron.js into feat/hide-read-more
This commit is contained in:
commit
e1fbad4a33
20
README.md
20
README.md
|
|
@ -99,3 +99,23 @@ In PHP for example, you can bypass all the script by setting this var `tarteauci
|
||||||
|
|
||||||
# Installation guide
|
# Installation guide
|
||||||
[Visit opt-out.ferank.eu](https://opt-out.ferank.eu/)
|
[Visit opt-out.ferank.eu](https://opt-out.ferank.eu/)
|
||||||
|
|
||||||
|
|
||||||
|
# How to use
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script type="text/javascript" src="/tarteaucitron/tarteaucitron.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
tarteaucitron.init({
|
||||||
|
"hashtag": "#tarteaucitron", /* Ouverture automatique du panel avec le hashtag */
|
||||||
|
"highPrivacy": false, /* désactiver le consentement implicite (en naviguant) ? */
|
||||||
|
"orientation": "top", /* le bandeau doit être en haut (top) ou en bas (bottom) ? */
|
||||||
|
"adblocker": false, /* Afficher un message si un adblocker est détecté */
|
||||||
|
"showAlertSmall": true, /* afficher le petit bandeau en bas à droite ? */
|
||||||
|
"cookieslist": true, /* Afficher la liste des cookies installés ? */
|
||||||
|
"removeCredit": false, /* supprimer le lien vers la source ? */
|
||||||
|
"cookieDomain": ".my-multisite-domaine.fr" /* Nom de domaine sur lequel sera posé le cookie - pour les multisites / sous-domaines - Facultatif */
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*global tarteaucitron */
|
/*global tarteaucitron */
|
||||||
tarteaucitron.lang = {
|
tarteaucitron.lang = {
|
||||||
"adblock": "Hola! Este sitio web es transparente y le da la opción de activar los servicios de terceros.",
|
"adblock": "Hola! Este sitio web es transparente y le da la opción de activar los servicios de terceros.",
|
||||||
"adblock_call": "Por favor deshabilite su AdBlocker para comenzar a personalizar.",
|
"adblock_call": "Por favor deshabilite su AdBlocker para empezar a personalizar los servicios.",
|
||||||
"reload": "Actualizar esta página",
|
"reload": "Actualizar esta página",
|
||||||
|
|
||||||
"alertBigScroll": "Al continuar para desplazarse,",
|
"alertBigScroll": "Al continuar para desplazarse,",
|
||||||
|
|
@ -14,7 +14,7 @@ tarteaucitron.lang = {
|
||||||
"acceptAll": "OK, aceptar todas",
|
"acceptAll": "OK, aceptar todas",
|
||||||
"close": "Cerrar",
|
"close": "Cerrar",
|
||||||
|
|
||||||
"all": "Preference for all services",
|
"all": "Ajustes para todos los servicios",
|
||||||
|
|
||||||
"info": "Protegiendo tu privacidad",
|
"info": "Protegiendo tu privacidad",
|
||||||
"disclaimer": "Aceptando estos servicios terceros, estas aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.",
|
"disclaimer": "Aceptando estos servicios terceros, estas aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.",
|
||||||
|
|
@ -28,7 +28,7 @@ tarteaucitron.lang = {
|
||||||
"source": "Ver sitio web oficial",
|
"source": "Ver sitio web oficial",
|
||||||
"credit": "Gestor de cookies realizada por tarteaucitron.js",
|
"credit": "Gestor de cookies realizada por tarteaucitron.js",
|
||||||
|
|
||||||
"fallback": "esta deshabilitado.",
|
"fallback": "está deshabilitado.",
|
||||||
|
|
||||||
"ads": {
|
"ads": {
|
||||||
"title": "Red de publicidad",
|
"title": "Red de publicidad",
|
||||||
|
|
|
||||||
|
|
@ -867,14 +867,15 @@ var tarteaucitron = {
|
||||||
expireTime = time + 31536000000, // 365 days
|
expireTime = time + 31536000000, // 365 days
|
||||||
regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
|
regex = new RegExp("!" + key + "=(wait|true|false)", "g"),
|
||||||
cookie = tarteaucitron.cookie.read().replace(regex, ""),
|
cookie = tarteaucitron.cookie.read().replace(regex, ""),
|
||||||
value = 'tarteaucitron=' + cookie + '!' + key + '=' + status;
|
value = 'tarteaucitron=' + cookie + '!' + key + '=' + status,
|
||||||
|
domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? 'domain=' + tarteaucitron.parameters.cookieDomain + ';' : '';
|
||||||
if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) {
|
|
||||||
|
if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) {
|
||||||
tarteaucitron.pro('!' + key + '=' + status);
|
tarteaucitron.pro('!' + key + '=' + status);
|
||||||
}
|
}
|
||||||
|
|
||||||
d.setTime(expireTime);
|
d.setTime(expireTime);
|
||||||
document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;';
|
document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;' + domain;
|
||||||
},
|
},
|
||||||
"read": function () {
|
"read": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
|
||||||
|
|
@ -854,7 +854,7 @@ tarteaucitron.services.analytics = {
|
||||||
};
|
};
|
||||||
window.ga.l = new Date();
|
window.ga.l = new Date();
|
||||||
|
|
||||||
tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
|
tarteaucitron.addScript('https://www.google-analytics.com/analytics.js', '', function () {
|
||||||
ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
|
ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
if (typeof tarteaucitron.user.analyticsMore === 'function') {
|
if (typeof tarteaucitron.user.analyticsMore === 'function') {
|
||||||
|
|
@ -871,12 +871,17 @@ tarteaucitron.services.gtag = {
|
||||||
"name": "Google Analytics (gtag.js)",
|
"name": "Google Analytics (gtag.js)",
|
||||||
"uri": "https://support.google.com/analytics/answer/6004245",
|
"uri": "https://support.google.com/analytics/answer/6004245",
|
||||||
"needConsent": true,
|
"needConsent": true,
|
||||||
"cookies": ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
|
"cookies": (function () {
|
||||||
|
// Add _gat_gtag_UA_XXXXXXX_XX cookie to cookies array
|
||||||
|
var gatGtagUaCookie = '_gat_gtag_' + tarteaucitron.user.gtagUa;
|
||||||
|
gatGtagUaCookie = gatGtagUaCookie.replace(/-/g, '_');
|
||||||
|
return ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', gatGtagUaCookie];
|
||||||
|
})(),
|
||||||
"js": function () {
|
"js": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
tarteaucitron.addScript('//www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
|
tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
|
||||||
function gtag(){dataLayer.push(arguments);}
|
function gtag(){dataLayer.push(arguments);}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
gtag('config', tarteaucitron.user.gtagUa);
|
gtag('config', tarteaucitron.user.gtagUa);
|
||||||
|
|
@ -968,6 +973,20 @@ tarteaucitron.services.jsapi = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// recaptcha
|
||||||
|
tarteaucitron.services.recaptcha = {
|
||||||
|
"key": "recaptcha",
|
||||||
|
"type": "api",
|
||||||
|
"name": "reCAPTCHA",
|
||||||
|
"uri": "http://www.google.com/policies/privacy/",
|
||||||
|
"needConsent": true,
|
||||||
|
"cookies": ['nid'],
|
||||||
|
"js": function () {
|
||||||
|
"use strict";
|
||||||
|
tarteaucitron.addScript('https://www.google.com/recaptcha/api.js');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// linkedin
|
// linkedin
|
||||||
tarteaucitron.services.linkedin = {
|
tarteaucitron.services.linkedin = {
|
||||||
"key": "linkedin",
|
"key": "linkedin",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue