From 489d37a5b24ba88df813b6a0d743f824fe500c0c Mon Sep 17 00:00:00 2001 From: lucmuller Date: Fri, 29 Jun 2018 11:56:03 +0200 Subject: [PATCH 01/96] Ajout d'un service pour Google On Steroids Voir : https://github.com/CardinalPath/gas --- tarteaucitron.services.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index ba771ea..dfc1151 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1030,6 +1030,38 @@ tarteaucitron.services.gajs = { } }; +// google on steroids +var _gas = _gas || []; +tarteaucitron.services.gas = { + "key": "gas", + "type": "analytic", + "name": "Google Analytics on Steroids", + "uri": "https://github.com/CardinalPath/gas", + "needConsent": true, + "cookies": ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'], + "js": function () { + "use strict"; + _gas.push(['_setAccount', tarteaucitron.user.gasUa]); // REPLACE WITH YOUR GA NUMBER + _gas.push(['_setDomainName', tarteaucitron.parameters.cookieDomain]); // REPLACE WITH YOUR DOMAIN + _gas.push(['_trackPageview']); + _gas.push(['_gasTrackForms']); + _gas.push(['_gasTrackOutboundLinks']); + _gas.push(['_gasTrackMaxScroll']); + _gas.push(['_gasTrackDownloads']); + _gas.push(['_gasTrackVideo']); + _gas.push(['_gasTrackAudio']); + _gas.push(['_gasTrackYoutube', {force: true}]); + _gas.push(['_gasTrackVimeo', {force: true}]); + _gas.push(['_gasTrackMailto']); + + tarteaucitron.addScript('//cdnjs.cloudflare.com/ajax/libs/gas/1.11.0/gas.min.js', 'gas-script', function () { + if (typeof tarteaucitron.user.gasMore === 'function') { + tarteaucitron.user.gasMore(); + } + },'','data-use-dcjs','false'); + } +}; + // google analytics tarteaucitron.services.analytics = { "key": "analytics", @@ -2165,3 +2197,4 @@ tarteaucitron.services.webmecanik = { }); } }; + From 720eb0aaa143011c2c705d98de49522bdb48818a Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Sat, 30 Jun 2018 08:53:37 +0200 Subject: [PATCH 02/96] Add a service to use multiple Google Analytics If you need to add multiple gtag.js tracker, use this services and pass a JavaScript array to tarteaucitron.user.multiplegtagUa = ['UA-XXXXXXXX', 'UA-XXXXXXXX']; --- tarteaucitron.services.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index ba771ea..03e1955 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2165,3 +2165,38 @@ tarteaucitron.services.webmecanik = { }); } }; + +// google analytics multiple +tarteaucitron.services.multiplegtag = { + "key": "multiplegtag", + "type": "analytic", + "name": "Google Analytics (gtag.js)", + "uri": "https://support.google.com/analytics/answer/6004245", + "needConsent": true, + "cookies": (function () { + + var cookies = ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz']; + + if (tarteaucitron.user.multiplegtagUa !== undefined) { + tarteaucitron.user.multiplegtagUa.forEach(function(ua) { + cookies.push('_gat_gtag_' + ua.replace(/-/g, '_')); + }); + } + + return cookies; + })(), + "js": function () { + "use strict"; + window.dataLayer = window.dataLayer || []; + + tarteaucitron.user.multiplegtagUa.forEach(function(ua) { + + tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + ua, '', function () { + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', ua); + }); + }); + } +}; + From 2e8ac445bb7c03000b47bbbb2c38223fc0e3c995 Mon Sep 17 00:00:00 2001 From: guillaumeKoban <40759279+guillaumeKoban@users.noreply.github.com> Date: Mon, 2 Jul 2018 15:10:50 +0200 Subject: [PATCH 03/96] Add Koban service --- README.md | 1 + tarteaucitron.services.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/README.md b/README.md index 75c6b96..a81ba9f 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Bonus: * Marketing Automation & CRM * Mautic * Webmecanik Automation + * Koban * Social network * AddThis diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 03e1955..425f763 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2200,3 +2200,31 @@ tarteaucitron.services.multiplegtag = { } }; +// Koban +tarteaucitron.services.koban = { + "key": "koban", + "type": "analytic", + "name": "Koban", + "uri": "https://koban.cloud/tos", + "needConsent": true, + "cookies": ['kbntrk'], + "js": function () { + "use strict"; + if (tarteaucitron.user.kobanurl === undefined) { + return; + } + if (tarteaucitron.user.kobanapi === undefined) { + return; + } + window.KobanObject = 'kb'; + window.kb = window.kb || function() { + window.kb.q = window.kb.q || []; + window.kb.q.push(arguments); + }; + window.kb.l = new Date(); + kb('reg', tarteaucitron.user.kobanapi); + tarteaucitron.addScript(tarteaucitron.user.kobanurl, '', function() { + }); + } +}; + From 1c917ed62b0aaa31e70fa576bf45e4b5d88b19e4 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Thu, 5 Jul 2018 10:33:59 +0200 Subject: [PATCH 04/96] Added matomo service without merge conflict --- tarteaucitron.services.js | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 03e1955..9ddf7fe 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2200,3 +2200,44 @@ tarteaucitron.services.multiplegtag = { } }; +// matomo + +/* + 1. Set the following variable before the initialization : + + tarteaucitron.user.matomoId = YOUR_SITE_ID_FROM_MATOMO; + tarteaucitron.user.matomoHost = "YOUR_MATOMO_URL"; //eg: https://stat.mydomain.com/ + + 2. Push the service : + + (tarteaucitron.job = tarteaucitron.job || []).push('matomo'); + + 3. HTML + You don't need to add any html code, if the service is autorized, the javascript is added. otherwise no. + */ +tarteaucitron.services.matomo = { + "key": "matomo", + "type": "analytic", + "name": "Matomo (formerly known as Piwik)", + "uri": "https://matomo.org/faq/general/faq_146/", + "needConsent": true, + "cookies": ['_pk_ref', '_pk_cvar', '_pk_id', '_pk_ses', '_pk_hsr', 'piwik_ignore', '_pk_uid'], + "js": function () { + "use strict"; + console.log("matomo"); + if (tarteaucitron.user.matomoId === undefined) { + return; + } + + window._paq = window._paq || []; + window._paq.push(["setSiteId", tarteaucitron.user.matomoId]); + window._paq.push(["setTrackerUrl", tarteaucitron.user.matomoHost + "piwik.php"]); + window._paq.push(["setDoNotTrack", 1]); + window._paq.push(["trackPageView"]); + window._paq.push(["setIgnoreClasses", ["no-tracking", "colorbox"]]); + window._paq.push(["enableLinkTracking"]); + + tarteaucitron.addScript(tarteaucitron.user.matomoHost + 'piwik.js', '', '', true, 'defer', true); + } +}; + From 1a4967acae4ef0ccba74d695b69acdfa9c0d2f3f Mon Sep 17 00:00:00 2001 From: Romain Baudot Date: Fri, 6 Jul 2018 11:29:24 +0200 Subject: [PATCH 05/96] Add a feature to display the 'Accept All' CTA when 'hightPrivacy : true' --- README.md | 1 + tarteaucitron.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75c6b96..158756e 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ In PHP for example, you can bypass all the script by setting this var `tarteauci tarteaucitron.init({ "hashtag": "#tarteaucitron", /* Ouverture automatique du panel avec le hashtag */ "highPrivacy": false, /* désactiver le consentement implicite (en naviguant) ? */ + "AcceptAllCta" : false, /* Afficher le CTA "Tout accepter" si "hightPrivacy : true" */ "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 ? */ diff --git a/tarteaucitron.js b/tarteaucitron.js index 39de7c1..144ec72 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -186,7 +186,8 @@ var tarteaucitron = { "removeCredit": false, "showAlertSmall": true, "cookieslist": true, - "handleBrowserDNTRequest": false + "handleBrowserDNTRequest": false, + "AcceptAllCta" : false }, params = tarteaucitron.parameters; @@ -275,7 +276,7 @@ var tarteaucitron = { orientation = 'Bottom'; } - if (defaults.highPrivacy) { + if (defaults.highPrivacy && !defaults.AcceptAllCta) { html += '
'; html += ' '; html += ' ' + tarteaucitron.lang.alertBigPrivacy; From 8168f29e12cf6cc76379cd116d8781a5888146e8 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Sat, 7 Jul 2018 12:04:31 +0200 Subject: [PATCH 06/96] removed console.log --- tarteaucitron.services.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 9ddf7fe..ea1eba1 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2224,7 +2224,6 @@ tarteaucitron.services.matomo = { "cookies": ['_pk_ref', '_pk_cvar', '_pk_id', '_pk_ses', '_pk_hsr', 'piwik_ignore', '_pk_uid'], "js": function () { "use strict"; - console.log("matomo"); if (tarteaucitron.user.matomoId === undefined) { return; } From bbd6cc01b986a6af4b984fafd99cb79130ed546b Mon Sep 17 00:00:00 2001 From: Julien Petit Date: Wed, 11 Jul 2018 17:28:45 +0200 Subject: [PATCH 07/96] Gtag variable should be set in global scope for later use (gtagMore or event calls) --- tarteaucitron.services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index ea1eba1..97b8b00 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1073,7 +1073,7 @@ tarteaucitron.services.gtag = { "use strict"; window.dataLayer = window.dataLayer || []; tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () { - function gtag(){dataLayer.push(arguments);} + window.gtag = function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', tarteaucitron.user.gtagUa); From bcef457b24c699d9610b186dd3ed9e30883dfd2f Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Thu, 12 Jul 2018 08:38:04 +0200 Subject: [PATCH 08/96] gtag() scope for multiple gtag ua --- tarteaucitron.services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 97b8b00..330cb31 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2192,7 +2192,7 @@ tarteaucitron.services.multiplegtag = { tarteaucitron.user.multiplegtagUa.forEach(function(ua) { tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + ua, '', function () { - function gtag(){dataLayer.push(arguments);} + window.gtag = function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', ua); }); From 719ebf0fdc3137bd828de389217770cf45475659 Mon Sep 17 00:00:00 2001 From: Yohann bianchi Date: Wed, 18 Jul 2018 15:33:18 +0200 Subject: [PATCH 09/96] =?UTF-8?q?=E2=9C=A8=20Add=20the=20ability=20to=20lo?= =?UTF-8?q?ad=20Google=20Maps=20libraries=20(ie.=20geometry,=20places,=20v?= =?UTF-8?q?isualization,=20drawing)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.services.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 330cb31..7857a67 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1103,7 +1103,13 @@ tarteaucitron.services.googlemaps = { tarteaucitron.user.mapscallback = 'tac_googlemaps_callback'; } - tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&key=' + tarteaucitron.user.googlemapsKey + '&callback='+tarteaucitron.user.mapscallback); + // Add Google Maps libraries if any (https://developers.google.com/maps/documentation/javascript/libraries) + var googleMapsLibraries; + if (tarteaucitron.user.googlemapsLibraries) { + googleMapsLibraries = '&libraries=' + tarteaucitron.user.googlemapsLibraries; + } + + tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&key=' + tarteaucitron.user.googlemapsKey + '&callback='+tarteaucitron.user.mapscallback + googleMapsLibraries); window.tac_googlemaps_callback = function () { tarteaucitron.fallback(['googlemaps-canvas'], function (x) { From c35edea79da580b7e9e9710ff0068d2f0218cb73 Mon Sep 17 00:00:00 2001 From: lucmuller Date: Mon, 23 Jul 2018 10:39:40 +0200 Subject: [PATCH 10/96] Update tarteaucitron.services.js --- tarteaucitron.services.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index c7838b5..4fc6a54 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -711,7 +711,7 @@ tarteaucitron.services.facebook = { "cookies": [], "js": function () { "use strict"; - tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], ''); + tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like', 'fb-video'], ''); tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk'); if (tarteaucitron.isAjax === true) { if (typeof FB !== "undefined") { @@ -722,7 +722,7 @@ tarteaucitron.services.facebook = { "fallback": function () { "use strict"; var id = 'facebook'; - tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id)); + tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like', 'fb-video'], tarteaucitron.engage(id)); } }; @@ -2230,4 +2230,4 @@ tarteaucitron.services.multiplegtag = { }); }); } -}; \ No newline at end of file +}; From 3dc11107aab0e6777a658623f58c10f14167952f Mon Sep 17 00:00:00 2001 From: lucmuller Date: Mon, 23 Jul 2018 10:46:14 +0200 Subject: [PATCH 11/96] Update tarteaucitron.services.js Suppression de Gogle On Steroids depuis mon master --- tarteaucitron.services.js | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index eb0ffe8..b79a78b 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1030,38 +1030,6 @@ tarteaucitron.services.gajs = { } }; -// google on steroids -var _gas = _gas || []; -tarteaucitron.services.gas = { - "key": "gas", - "type": "analytic", - "name": "Google Analytics on Steroids", - "uri": "https://github.com/CardinalPath/gas", - "needConsent": true, - "cookies": ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'], - "js": function () { - "use strict"; - _gas.push(['_setAccount', tarteaucitron.user.gasUa]); // REPLACE WITH YOUR GA NUMBER - _gas.push(['_setDomainName', tarteaucitron.parameters.cookieDomain]); // REPLACE WITH YOUR DOMAIN - _gas.push(['_trackPageview']); - _gas.push(['_gasTrackForms']); - _gas.push(['_gasTrackOutboundLinks']); - _gas.push(['_gasTrackMaxScroll']); - _gas.push(['_gasTrackDownloads']); - _gas.push(['_gasTrackVideo']); - _gas.push(['_gasTrackAudio']); - _gas.push(['_gasTrackYoutube', {force: true}]); - _gas.push(['_gasTrackVimeo', {force: true}]); - _gas.push(['_gasTrackMailto']); - - tarteaucitron.addScript('//cdnjs.cloudflare.com/ajax/libs/gas/1.11.0/gas.min.js', 'gas-script', function () { - if (typeof tarteaucitron.user.gasMore === 'function') { - tarteaucitron.user.gasMore(); - } - },'','data-use-dcjs','false'); - } -}; - // google analytics tarteaucitron.services.analytics = { "key": "analytics", @@ -2270,4 +2238,4 @@ tarteaucitron.services.matomo = { tarteaucitron.addScript(tarteaucitron.user.matomoHost + 'piwik.js', '', '', true, 'defer', true); } -}; \ No newline at end of file +}; From 249a00dd7ebdbe53457846999294c44bdd7233e5 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 25 Jul 2018 19:59:41 +0200 Subject: [PATCH 12/96] Fix missing braces Thanks @rubycon --- tarteaucitron.services.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 21216f2..de910e4 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2231,6 +2231,9 @@ tarteaucitron.services.koban = { kb('reg', tarteaucitron.user.kobanapi); tarteaucitron.addScript(tarteaucitron.user.kobanurl, '', function() { }); + } +}; + // matomo /* From dbb120fc66b798fa4225f3afc9fc1cfc636ccac7 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Thu, 26 Jul 2018 10:51:21 +0200 Subject: [PATCH 13/96] Added Hotjar service --- tarteaucitron.services.js | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index de910e4..4b2340e 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2273,3 +2273,47 @@ tarteaucitron.services.matomo = { tarteaucitron.addScript(tarteaucitron.user.matomoHost + 'piwik.js', '', '', true, 'defer', true); } }; + +// Hotjar + +/* + 1. Set the following variable before the initialization : + + tarteaucitron.user.hotjarId = YOUR_WEBSITE_ID; + tarteaucitron.user.HotjarSv = XXXX; // Can be found in your website tracking code as "hjvs=XXXX" + + 2. Push the service : + + (tarteaucitron.job = tarteaucitron.job || []).push('hotjar'); + + 3. HTML + You don't need to add any html code, if the service is autorized, the javascript is added. otherwise no. + + + */ +tarteaucitron.services.hotjar = { + "key": "hotjar", + "type": "analytic", + "name": "Hotjar", + "uri": "https://help.hotjar.com/hc/en-us/sections/115003204947-What-is-Hotjar-", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + if (tarteaucitron.user.hotjarId === undefined || tarteaucitron.user.HotjarSv === undefined) { + return; + } + + window.hj = window.hj || function() { + (window.hj.q = window.hj.q || []).push(arguments) + }; + window._hjSettings = { + hjid: tarteaucitron.user.hotjarId, + hjsv: tarteaucitron.user.HotjarSv + }; + + var uri = 'https://static.hotjar.com/c/hotjar-'; + var extension = '.js?sv='; + tarteaucitron.addScript(uri + window._hjSettings.hjid + extension + window._hjSettings.hjsv); + } +}; From b1cae8da4f50ce77fcfcd8853a65b05319873be9 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Fri, 27 Jul 2018 10:55:14 +0200 Subject: [PATCH 14/96] added utility function to AddOrUpdate a field on object --- tarteaucitron.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index 39de7c1..6596829 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -11,6 +11,20 @@ var scripts = document.getElementsByTagName('script'), tarteaucitronProLoadServices, tarteaucitronNoAdBlocker = false; +/** + Utility function to Add or update the fields of obj1 with the ones in obj2 +*/ +function AddOrUpdate(obj1, obj2){ + for(key in obj2){ + if(obj2[key] instanceof Object){ + obj1[key] = AddOrUpdate(obj1[key], obj2[key]); + }else{ + obj1[key] = obj2[key]; + } + } + return obj1; +} + var tarteaucitron = { "version": 323, "cdn": cdn, From 1d97b3fa956afe95cf8daf5e15f335179d36d87f Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Fri, 27 Jul 2018 10:55:50 +0200 Subject: [PATCH 15/96] Update tarteaucitron.lang with the custom text given --- tarteaucitron.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index 6596829..2c1332a 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -223,6 +223,10 @@ var tarteaucitron = { // Step 2: load language and services tarteaucitron.addScript(pathToLang, '', function () { + + if(tarteaucitronCustomText !== undefined){ + tarteaucitron.lang = AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText); + } tarteaucitron.addScript(pathToServices, '', function () { var body = document.body, From a59ee49abba80ffa1ac85a9b4e68e0ffb6ec3295 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Fri, 27 Jul 2018 19:33:31 +0200 Subject: [PATCH 16/96] corrected if undefined variable --- tarteaucitron.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 2c1332a..eee83a4 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -7,6 +7,7 @@ var scripts = document.getElementsByTagName('script'), alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch, tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage, tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire, + tarteaucitronCustomText = (tarteaucitronCustomText === undefined) ? '' : tarteaucitronCustomText, timeExipre = 31536000000, tarteaucitronProLoadServices, tarteaucitronNoAdBlocker = false; @@ -224,7 +225,7 @@ var tarteaucitron = { // Step 2: load language and services tarteaucitron.addScript(pathToLang, '', function () { - if(tarteaucitronCustomText !== undefined){ + if(tarteaucitronCustomText !== ''){ tarteaucitron.lang = AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText); } tarteaucitron.addScript(pathToServices, '', function () { From 1ea7bfa82ab2fca3ca1faacd66b96f39b4e638d4 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Mon, 30 Jul 2018 19:47:12 +0200 Subject: [PATCH 17/96] move utility function in tarteaucitron --- tarteaucitron.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index eee83a4..6669694 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -12,19 +12,7 @@ var scripts = document.getElementsByTagName('script'), tarteaucitronProLoadServices, tarteaucitronNoAdBlocker = false; -/** - Utility function to Add or update the fields of obj1 with the ones in obj2 -*/ -function AddOrUpdate(obj1, obj2){ - for(key in obj2){ - if(obj2[key] instanceof Object){ - obj1[key] = AddOrUpdate(obj1[key], obj2[key]); - }else{ - obj1[key] = obj2[key]; - } - } - return obj1; -} + var tarteaucitron = { "version": 323, @@ -226,7 +214,7 @@ var tarteaucitron = { tarteaucitron.addScript(pathToLang, '', function () { if(tarteaucitronCustomText !== ''){ - tarteaucitron.lang = AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText); + tarteaucitron.lang = tarteaucitron.AddOrUpdate(tarteaucitron.lang, tarteaucitronCustomText); } tarteaucitron.addScript(pathToServices, '', function () { @@ -1304,5 +1292,18 @@ var tarteaucitron = { } tarteaucitron.cookie.number(); + }, + "AddOrUpdate" : function AddOrUpdate(source, custom){ + /** + Utility function to Add or update the fields of obj1 with the ones in obj2 + */ + for(key in custom){ + if(custom[key] instanceof Object){ + source[key] = AddOrUpdate(source[key], custom[key]); + }else{ + source[key] = custom[key]; + } + } + return source; } }; From b4c14b9ec9180024841c35ab738f240a8c20ed98 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Tue, 31 Jul 2018 09:44:18 +0200 Subject: [PATCH 18/96] corrected call to the method --- tarteaucitron.js | 194 +++++++++++++++++++++++------------------------ 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 6669694..61d14b6 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -30,7 +30,7 @@ var tarteaucitron = { "init": function (params) { "use strict"; var origOpen; - + tarteaucitron.parameters = params; if (alreadyLaunch === 0) { alreadyLaunch = 1; @@ -50,13 +50,13 @@ var tarteaucitron = { if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) { if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') { heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px'; - + if (scrollPos > (screen.height * 2)) { tarteaucitron.userInterface.respondAll(true); } else if (scrollPos > (screen.height / 2)) { document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '' + tarteaucitron.lang.alertBigScroll + ' ' + tarteaucitron.lang.alertBig; } - + if (tarteaucitron.orientation === 'top') { document.getElementById('tarteaucitronPercentage').style.top = heightPosition; } else { @@ -82,7 +82,7 @@ var tarteaucitron = { tarteaucitron.userInterface.jsSizing('main'); } } - + if (document.getElementById('tarteaucitronCookiesListContainer') !== null) { if (document.getElementById('tarteaucitronCookiesListContainer').style.display === 'block') { tarteaucitron.userInterface.jsSizing('cookie'); @@ -105,7 +105,7 @@ var tarteaucitron = { if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) { if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') { heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px'; - + if (scrollPos > (screen.height * 2)) { tarteaucitron.userInterface.respondAll(true); } else if (scrollPos > (screen.height / 2)) { @@ -136,7 +136,7 @@ var tarteaucitron = { tarteaucitron.userInterface.jsSizing('main'); } } - + if (document.getElementById('tarteaucitronCookiesListContainer') !== null) { if (document.getElementById('tarteaucitronCookiesListContainer').style.display === 'block') { tarteaucitron.userInterface.jsSizing('cookie'); @@ -144,11 +144,11 @@ var tarteaucitron = { } }); } - + if (typeof XMLHttpRequest !== 'undefined') { origOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function () { - + if (window.addEventListener) { this.addEventListener("load", function () { if (typeof tarteaucitronProLoadServices === 'function') { @@ -166,7 +166,7 @@ var tarteaucitron = { setTimeout(tarteaucitronProLoadServices, 1000); } } - + try { origOpen.apply(this, arguments); } catch (err) {} @@ -192,12 +192,12 @@ var tarteaucitron = { "handleBrowserDNTRequest": false }, params = tarteaucitron.parameters; - + // Step 0: get params if (params !== undefined) { tarteaucitron.extend(defaults, params); } - + // global tarteaucitron.orientation = defaults.orientation; tarteaucitron.hashtag = defaults.hashtag; @@ -225,7 +225,7 @@ var tarteaucitron = { orientation = 'Top', cat = ['ads', 'analytic', 'api', 'comment', 'social', 'support', 'video', 'other'], i; - + cat = cat.sort(function (a, b) { if (tarteaucitron.lang[a].title > tarteaucitron.lang[b].title) { return 1; } if (tarteaucitron.lang[a].title < tarteaucitron.lang[b].title) { return -1; } @@ -277,11 +277,11 @@ var tarteaucitron = { html += '
'; html += ' '; html += ''; - + if (defaults.orientation === 'bottom') { orientation = 'Bottom'; } - + if (defaults.highPrivacy) { html += '
'; html += ' '; @@ -305,7 +305,7 @@ var tarteaucitron = { html += '
'; html += '
'; } - + if (defaults.showAlertSmall === true) { html += '
'; html += '
'; @@ -332,7 +332,7 @@ var tarteaucitron = { } html += '
'; } - + tarteaucitron.addScript(tarteaucitron.cdn + 'advertising.js?v=' + tarteaucitron.version, '', function () { if (tarteaucitronNoAdBlocker === true || defaults.adblocker === false) { div.id = 'tarteaucitronRoot'; @@ -347,7 +347,7 @@ var tarteaucitron = { } else { tarteaucitron.job = [] } - + tarteaucitron.isAjax = true; tarteaucitron.job.push = function (id) { @@ -370,16 +370,16 @@ var tarteaucitron = { tarteaucitron.launch[id] = false; tarteaucitron.addService(id); }; - + if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') { tarteaucitron.userInterface.openPanel(); } - + tarteaucitron.cookie.number(); setInterval(tarteaucitron.cookie.number, 60000); } }, defaults.adblocker); - + if (defaults.adblocker === true) { setTimeout(function () { if (tarteaucitronNoAdBlocker === false) { @@ -423,7 +423,7 @@ var tarteaucitron = { if (tarteaucitron.added[service.key] !== true) { tarteaucitron.added[service.key] = true; - + html += '
'; html += '
'; html += ' ' + service.name + '
'; @@ -445,13 +445,13 @@ var tarteaucitron = { html += '
'; html += '
'; html += '
'; - + tarteaucitron.userInterface.css('tarteaucitronServicesTitle_' + service.type, 'display', 'block'); - + if (document.getElementById('tarteaucitronServices_' + service.type) !== null) { document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html; } - + tarteaucitron.userInterface.order(service.type); } @@ -460,7 +460,7 @@ var tarteaucitron = { isAllowed = true; tarteaucitron.cookie.create(service.key, true); } - + if ((!isResponded && (isAutostart || (isNavigating && isWaiting)) && !tarteaucitron.highPrivacy) || isAllowed) { if (!isAllowed) { tarteaucitron.cookie.create(service.key, true); @@ -502,7 +502,7 @@ var tarteaucitron = { out = [], obj = {}, s = tarteaucitron.services; - + for (i = 0; i < len; i += 1) { if (!obj[arr[i]]) { obj[arr[i]] = {}; @@ -511,13 +511,13 @@ var tarteaucitron = { } } } - + out = out.sort(function (a, b) { if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; } if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; } return 0; }); - + return out; }, "userInterface": { @@ -533,7 +533,7 @@ var tarteaucitron = { service, key, index = 0; - + for (index = 0; index < tarteaucitron.job.length; index += 1) { service = s[tarteaucitron.job[index]]; key = service.key; @@ -554,16 +554,16 @@ var tarteaucitron = { "respond": function (el, status) { "use strict"; var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), ''); - + // return if same state if (tarteaucitron.state[key] === status) { return; } - + if (status === false && tarteaucitron.launch[key] === true) { tarteaucitron.reloadThePage = true; } - + // if not already launched... launch the service if (status === true) { if (tarteaucitron.launch[key] !== true) { @@ -610,11 +610,11 @@ var tarteaucitron = { nbAllowed += 1; } } - + tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%'); tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%'); tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%'); - + if (nbDenied === 0 && nbPending === 0) { tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark); tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray); @@ -625,16 +625,16 @@ var tarteaucitron = { tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray); tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray); } - + // close the alert if all service have been reviewed if (nbPending === 0) { tarteaucitron.userInterface.closeAlert(); } - + if (tarteaucitron.services[key].cookies.length > 0 && status === false) { tarteaucitron.cookie.purge(tarteaucitron.services[key].cookies); } - + if (status === true) { if (document.getElementById('tacCL' + key) !== null) { document.getElementById('tacCL' + key).innerHTML = '...'; @@ -655,17 +655,17 @@ var tarteaucitron = { }, "closePanel": function () { "use strict"; - + if (document.location.hash === tarteaucitron.hashtag) { document.location.hash = ''; } tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); - + tarteaucitron.fallback(['tarteaucitronInfoBox'], function (elem) { elem.style.display = 'none'; }, true); - + if (tarteaucitron.reloadThePage === true) { window.location.reload(); } else { @@ -690,11 +690,11 @@ var tarteaucitron = { "toggleCookiesList": function () { "use strict"; var div = document.getElementById('tarteaucitronCookiesListContainer'); - + if (div === null) { return; } - + if (div.style.display !== 'block') { tarteaucitron.cookie.number(); div.style.display = 'block'; @@ -713,11 +713,11 @@ var tarteaucitron = { "toggle": function (id, closeClass) { "use strict"; var div = document.getElementById(id); - + if (div === null) { return; } - + if (closeClass !== undefined) { tarteaucitron.fallback([closeClass], function (elem) { if (elem.id !== id) { @@ -725,7 +725,7 @@ var tarteaucitron = { } }, true); } - + if (div.style.display !== 'block') { div.style.display = 'block'; } else { @@ -742,9 +742,9 @@ var tarteaucitron = { if (main === null) { return; } - + allDivs = main.childNodes; - + if (typeof Array.prototype.map === 'function') { Array.prototype.map.call(main.children, Object).sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } @@ -774,18 +774,18 @@ var tarteaucitron = { paddingBox, alertSmallHeight, cookiesNumberHeight; - + if (type === 'box') { if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) { - + // reset tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', '0px 10px'); - + // calculate alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight; cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight; paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2; - + // apply tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px'); } @@ -799,79 +799,79 @@ var tarteaucitron = { // height of the services list container if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) { - + // reset tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', 'auto'); - + // calculate mainHeight = document.getElementById('tarteaucitron').offsetHeight; closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight; headerHeight = document.getElementById('tarteaucitronMainLineOffset').offsetHeight; - + // apply servicesHeight = (mainHeight - closeButtonHeight - headerHeight + 1); tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', servicesHeight + 'px'); } - + // align the main allow/deny button depending on scrollbar width if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) { - + // media query if (e[a + 'Width'] <= 479) { tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginLeft', '11px'); } else if (e[a + 'Width'] <= 767) { scrollbarMarginRight = 12; } - + scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth; scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth; tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px'); } - + // center the main panel if (document.getElementById('tarteaucitron') !== null) { - + // media query if (e[a + 'Width'] <= 767) { mainTop = 0; } else { mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21; } - + // correct if (mainTop < 0) { mainTop = 0; } - + if (document.getElementById('tarteaucitronMainLineOffset') !== null) { if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) { mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight; } } - + // apply tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px'); } } else if (type === 'cookie') { - + // put cookies list at bottom if (document.getElementById('tarteaucitronAlertSmall') !== null) { tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px'); } - + // height of cookies list if (document.getElementById('tarteaucitronCookiesListContainer') !== null) { - + // reset tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', 'auto'); - + // calculate cookiesListHeight = document.getElementById('tarteaucitronCookiesListContainer').offsetHeight; cookiesCloseHeight = document.getElementById('tarteaucitronClosePanelCookie').offsetHeight; cookiesTitleHeight = document.getElementById('tarteaucitronCookiesTitle').offsetHeight; - + // apply tarteaucitron.userInterface.css('tarteaucitronCookiesList', 'height', (cookiesListHeight - cookiesCloseHeight - cookiesTitleHeight - 2) + 'px'); } @@ -924,7 +924,7 @@ var tarteaucitron = { "purge": function (arr) { "use strict"; var i; - + for (i = 0; i < arr.length; i += 1) { 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 + ';'; @@ -939,7 +939,7 @@ var tarteaucitron = { html = '', i, status = document.cookie.indexOf(key + '=true'); - + if (status >= 0 && nb === 0) { html += tarteaucitron.lang.useNoCookie; } else if (status >= 0) { @@ -954,7 +954,7 @@ var tarteaucitron = { } } } - + if (nbCurrent > 0) { html += tarteaucitron.lang.useCookieCurrent + ' ' + nbCurrent + ' cookie'; if (nbCurrent > 1) { @@ -973,7 +973,7 @@ var tarteaucitron = { } html += '.'; } - + if (document.getElementById('tacCL' + key) !== null) { document.getElementById('tacCL' + key).innerHTML = html; } @@ -1004,7 +1004,7 @@ var tarteaucitron = { regex = /^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i, regexedDomain = (tarteaucitron.cdn.match(regex) !== null) ? tarteaucitron.cdn.match(regex)[1] : tarteaucitron.cdn, host = (tarteaucitron.domain !== undefined) ? tarteaucitron.domain : regexedDomain; - + cookies = cookies.sort(function (a, b) { namea = a.split('=', 1).toString().replace(/ /g, ''); nameb = b.split('=', 1).toString().replace(/ /g, ''); @@ -1014,7 +1014,7 @@ var tarteaucitron = { if (c + a < d + b) { return -1; } return 0; }); - + if (document.cookie !== '') { for (i = 0; i < nb; i += 1) { name = cookies[i].split('=', 1).toString().replace(/ /g, ''); @@ -1045,21 +1045,21 @@ var tarteaucitron = { html += '
'; html += ''; } - + html += '
'; - + if (document.getElementById('tarteaucitronCookiesList') !== null) { document.getElementById('tarteaucitronCookiesList').innerHTML = html; } - + if (document.getElementById('tarteaucitronCookiesNumber') !== null) { document.getElementById('tarteaucitronCookiesNumber').innerHTML = nb; } - + if (document.getElementById('tarteaucitronCookiesNumberBis') !== null) { document.getElementById('tarteaucitronCookiesNumberBis').innerHTML = nb + ' cookie' + s; } - + for (i = 0; i < tarteaucitron.job.length; i += 1) { tarteaucitron.cookie.checkCount(tarteaucitron.job[i]); } @@ -1068,7 +1068,7 @@ var tarteaucitron = { "getLanguage": function () { "use strict"; if (!navigator) { return 'en'; } - + var availableLanguages = 'cs,en,fr,es,it,de,nl,pt,pl,ru', defaultLanguage = 'en', lang = navigator.language || navigator.browserLanguage || @@ -1080,7 +1080,7 @@ var tarteaucitron = { return tarteaucitronForceLanguage; } } - + if (availableLanguages.indexOf(userLanguage) === -1) { return defaultLanguage; } @@ -1089,11 +1089,11 @@ var tarteaucitron = { "getLocale": function () { "use strict"; if (!navigator) { return 'en_US'; } - + var lang = navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null, userLanguage = lang.substr(0, 2); - + if (userLanguage === 'fr') { return 'fr_FR'; } else if (userLanguage === 'en') { @@ -1116,7 +1116,7 @@ var tarteaucitron = { "use strict"; var script, done = false; - + if (execute === false) { if (typeof callback === 'function') { callback(); @@ -1127,7 +1127,7 @@ var tarteaucitron = { script.id = (id !== undefined) ? id : ''; script.async = true; script.src = url; - + if (attrName !== undefined && attrVal !== undefined) { script.setAttribute(attrName, attrVal); } @@ -1141,7 +1141,7 @@ var tarteaucitron = { } }; } - + document.getElementsByTagName('head')[0].appendChild(script); } }, @@ -1159,12 +1159,12 @@ var tarteaucitron = { document.writeln = function (content) { tarteaucitron.makeAsync.buffer += content.concat("\n"); }; - + setTimeout(function () { document.write = savedWrite; document.writeln = savedWriteln; }, 20000); - + tarteaucitron.makeAsync.getAndParse(url, id); }, "getAndParse": function (url, id) { @@ -1192,7 +1192,7 @@ var tarteaucitron = { if (document.getElementById(id) === null) { return; } - + scripts = document.getElementById(id).getElementsByTagName('script'); for (i = 0; i < scripts.length; i += 1) { type = (scripts[i].getAttribute('type') !== null) ? scripts[i].getAttribute('type') : ''; @@ -1238,7 +1238,7 @@ var tarteaucitron = { "use strict"; var html = '', r = Math.floor(Math.random() * 100000); - + html += '
'; html += '
'; html += ' ' + tarteaucitron.services[id].name + ' ' + tarteaucitron.lang.fallback; @@ -1247,7 +1247,7 @@ var tarteaucitron = { html += '
'; html += '
'; html += ''; - + return html; }, "extend": function (a, b) { @@ -1276,30 +1276,30 @@ var tarteaucitron = { var div = document.getElementById('tarteaucitronPremium'), timestamp = new Date().getTime(), url = '//opt-out.ferank.eu/premium.php?'; - + if (div === null) { return; } - + url += 'domain=' + tarteaucitron.domain + '&'; url += 'uuid=' + tarteaucitron.uuid + '&'; url += 'c=' + encodeURIComponent(tarteaucitron.proTemp) + '&'; url += '_' + timestamp; - + div.innerHTML = ''; - + tarteaucitron.proTemp = ''; } - + tarteaucitron.cookie.number(); }, - "AddOrUpdate" : function AddOrUpdate(source, custom){ + "AddOrUpdate" : function(source, custom){ /** Utility function to Add or update the fields of obj1 with the ones in obj2 */ for(key in custom){ if(custom[key] instanceof Object){ - source[key] = AddOrUpdate(source[key], custom[key]); + source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]); }else{ source[key] = custom[key]; } From 933ea94c31c7894ce5139920da85f6484d436193 Mon Sep 17 00:00:00 2001 From: Yoram Griguer Date: Tue, 31 Jul 2018 17:56:45 +0200 Subject: [PATCH 19/96] Give the possibility to change cookie's name --- README.md | 1 + tarteaucitron.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a81ba9f..0544792 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ In PHP for example, you can bypass all the script by setting this var `tarteauci ``` From 3b3cca049bd74b14cb1d19c13f639e3dbe702108 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 28 Aug 2018 10:57:52 +0200 Subject: [PATCH 39/96] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a369845..85c33d1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/SASAICAGENCY) +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/SASAICAGENCY) [![](https://data.jsdelivr.com/v1/package/gh/AmauriC/tarteaucitron.js/badge)](https://www.jsdelivr.com/package/gh/AmauriC/tarteaucitron.js) + tarteaucitron.js From 40222f845cb4f29ee556c5ca086a83fd4ff2fa19 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 28 Aug 2018 11:18:18 +0200 Subject: [PATCH 40/96] Update tarteaucitron.css --- css/tarteaucitron.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index be1fa19..12842e5 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -3,6 +3,8 @@ height: 100%; } +#contentWrapper {display:unset;} + /*** * Reset CSS */ @@ -268,7 +270,6 @@ h2#tarteaucitronCookiesNumberBis { #tarteaucitron #tarteaucitronServices .tarteaucitronTitle button, #tarteaucitron #tarteaucitronInfo, #tarteaucitron #tarteaucitronServices .tarteaucitronDetails { - background: #333; color: #fff; display: inline-block; font-size: 14px; From 7cf9cd56595fe5f9b7a9da099fd83a026c6c985c Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 28 Aug 2018 11:18:53 +0200 Subject: [PATCH 41/96] Time to reload files --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index f7c544e..fbf4f7d 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180828, + "version": 20180828003, "cdn": cdn, "user": {}, "lang": {}, From f0e73b157cd090addd0357038b6b22e063a99921 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 28 Aug 2018 11:21:23 +0200 Subject: [PATCH 42/96] No transparency on the loading bar --- css/tarteaucitron.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 12842e5..03a39c3 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -469,7 +469,7 @@ h2#tarteaucitronCookiesNumberBis { } #tarteaucitronPercentage { - background: #0A0; + background: #0A0!important; box-shadow: 0 0 2px #fff, 0 1px 2px #555; height: 5px; left: 0; From af76f8415a29b7cd7565e882bef2debda85579a7 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 29 Aug 2018 10:05:11 +0200 Subject: [PATCH 43/96] Removed break line after service name --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index fbf4f7d..4de776e 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -475,7 +475,7 @@ var tarteaucitron = { html += '
  • '; html += '
    '; - html += '

    ' + service.name + '


    '; + html += '

    ' + service.name + '

    '; html += '
    '; if (tarteaucitron.parameters.moreInfoLink == true) { html += ' '; From a31264e13d96bb66a0d4e48efbe6d97bdc13b487 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 29 Aug 2018 11:12:57 +0200 Subject: [PATCH 44/96] Add an option to display a link to the privacy url "privacyUrl": "https://example.com/privacy-policy", --- README.md | 87 +--------------------------------------- css/tarteaucitron.css | 4 +- lang/tarteaucitron.cs.js | 2 + lang/tarteaucitron.de.js | 2 + lang/tarteaucitron.en.js | 2 + lang/tarteaucitron.es.js | 2 + lang/tarteaucitron.fr.js | 2 + lang/tarteaucitron.it.js | 2 + lang/tarteaucitron.nl.js | 4 +- lang/tarteaucitron.pl.js | 2 + lang/tarteaucitron.pt.js | 3 ++ lang/tarteaucitron.ru.js | 2 + tarteaucitron.js | 21 ++++++++-- 13 files changed, 43 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 85c33d1..36f03f1 100644 --- a/README.md +++ b/README.md @@ -20,92 +20,6 @@ Bonus: - Load service when user click on Allow (without reload of the page), - Incorporate a fallback system (display a link instead of social button and a static banner instead of advertising). -## Supported services -* Advertising network - * Ad Up Technology (ads) - * Ad Up Technology (conversion) - * Ad Up Technology (retargeting) - * Amazon - * Clicmanager - * Criteo - * FERank (pub) - * Google Adsense - * Google Adsense Search (form) - * Google Adsense Search (result) - * Google Adwords (conversion) - * Google Adwords (remarketing) - * Pubdirecte - * Twenga - * vShop - -* APIs - * Google jsapi - * Google Maps - * Google Tag Manager - * Timeline JS - * Typekit (adobe) - -* Audience measurement - * Alexa - * Clicky - * Crazyegg - * FERank - * Get+ - * Google Analytics (ga.js) - * Google Analytics (universal) - * StatCounter - * VisualRevenue - * Xiti - -* Comment - * Disqus - * Facebook (commentaire) - -* Marketing Automation & CRM - * Mautic - * Webmecanik Automation - * Koban - -* Social network - * AddThis - * AddToAny (feed) - * AddToAny (share) - * eKomi - * Facebook - * Facebook (like box) - * Google+ - * Google+ (badge) - * Linkedin - * Pinterest - * Shareaholic - * ShareThis - * Twitter - * Twitter (cards) - * Twitter (timelines) - -* Support - * UserVoice - * Zopim - -* Video - * Calameo - * Dailymotion - * Prezi - * SlideShare - * Vimeo - * YouTube - * Issuu - - -## Visitors outside the EU -In PHP for example, you can bypass all the script by setting this var `tarteaucitron.user.bypass = true;` if the visitor is not in the EU. - -## Tested on -- IE 6+ -- FF 3+ -- Safari 4+ -- Chrome 14+ -- Opera 10+ # Installation guide [Visit opt-out.ferank.eu](https://opt-out.ferank.eu/) @@ -129,6 +43,7 @@ tarteaucitron.init({ "removeCredit": false, /* supprimer le lien vers la source ? */ "handleBrowserDNTRequest": false, /* Répondre au DoNotTrack du navigateur ?*/ "moreInfoLink": true, + "privacyUrl": "", //"cookieDomain": ".my-multisite-domaine.fr" /* Nom de domaine sur lequel sera posé le cookie - pour les multisites / sous-domaines - Facultatif */ }); diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 03a39c3..c35742a 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -448,7 +448,7 @@ h2#tarteaucitronCookiesNumberBis { font-weight: 700; } -#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize { +#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitronAlertBig #tarteaucitronPrivacyUrl { background: #008300; color: #fff; cursor: pointer; @@ -459,7 +459,7 @@ h2#tarteaucitronCookiesNumberBis { margin-left: 7px; } -#tarteaucitronAlertBig #tarteaucitronCloseAlert { +#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPrivacyUrl { background: #fff; color: #333; font-size: 13px; diff --git a/lang/tarteaucitron.cs.js b/lang/tarteaucitron.cs.js index 915d950..1120254 100644 --- a/lang/tarteaucitron.cs.js +++ b/lang/tarteaucitron.cs.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "personalize": "Přizpůsobit", "acceptAll": "OK, přijmout vše", "close": "Zavřít", + + "privacyUrl": "Zásady ochrany osobních údajů", "all": "Nastavení všech služeb", diff --git a/lang/tarteaucitron.de.js b/lang/tarteaucitron.de.js index 939149d..c39a1bd 100644 --- a/lang/tarteaucitron.de.js +++ b/lang/tarteaucitron.de.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "personalize": "Personalisieren", "acceptAll": "OK, akzeptiere alles", "close": "Beenden", + + "privacyUrl": "Datenschutz-Bestimmungen", "all": "Präferenz für alle Dienste", diff --git a/lang/tarteaucitron.en.js b/lang/tarteaucitron.en.js index 8441457..0d4bc0b 100644 --- a/lang/tarteaucitron.en.js +++ b/lang/tarteaucitron.en.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "personalize": "Personalize", "acceptAll": "OK, accept all", "close": "Close", + + "privacyUrl": "Privacy policy", "all": "Preference for all services", diff --git a/lang/tarteaucitron.es.js b/lang/tarteaucitron.es.js index 986ef67..7b2232a 100644 --- a/lang/tarteaucitron.es.js +++ b/lang/tarteaucitron.es.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "personalize": "Personalizar", "acceptAll": "OK, aceptar todas", "close": "Cerrar", + + "privacyUrl": "Política de privacidad", "all": "Ajustes para todos los servicios", diff --git a/lang/tarteaucitron.fr.js b/lang/tarteaucitron.fr.js index 09fd7e1..882e312 100644 --- a/lang/tarteaucitron.fr.js +++ b/lang/tarteaucitron.fr.js @@ -14,6 +14,8 @@ tarteaucitron.lang = { "personalize": "Personnaliser", "close": "Fermer", + "privacyUrl": "Politique de confidentialité", + "all": "Préférence pour tous les services", "info": "Protection de votre vie privée", diff --git a/lang/tarteaucitron.it.js b/lang/tarteaucitron.it.js index 89f8393..e369860 100644 --- a/lang/tarteaucitron.it.js +++ b/lang/tarteaucitron.it.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "acceptAll": "Ok, accetta tutto", "personalize": "Personalizza", "close": "Chiudi", + + "privacyUrl": "Politica sulla riservatezza", "all": "Preferenze per tutti i servizi", diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js index 2b7a1a5..d2917a2 100644 --- a/lang/tarteaucitron.nl.js +++ b/lang/tarteaucitron.nl.js @@ -13,7 +13,9 @@ tarteaucitron.lang = { "personalize": "Personaliseer", "acceptAll": "OK, accepteer alle", "close": "Sluit", - + + "privacyUrl": "Privacybeleid", + "all": "Voorkeur voor alle diensten", "info": "Bescherming van uw privacy", diff --git a/lang/tarteaucitron.pl.js b/lang/tarteaucitron.pl.js index fdbcc95..3da7f46 100644 --- a/lang/tarteaucitron.pl.js +++ b/lang/tarteaucitron.pl.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "personalize": "Personalizacja", "acceptAll": "OK, akceptuję wszystko", "close": "zamknij", + + "privacyUrl": "Polityka prywatności", "all": "Preferencja dla wszystkich usług", diff --git a/lang/tarteaucitron.pt.js b/lang/tarteaucitron.pt.js index 303893b..6c564e3 100644 --- a/lang/tarteaucitron.pt.js +++ b/lang/tarteaucitron.pt.js @@ -13,6 +13,9 @@ tarteaucitron.lang = { "personalize": "Personalizar", "acceptAll": "OK, aceitar tudo", "close": "Fechar", + + "privacyUrl": "Política de Privacidade", + "all": "Definições dos serviços", "info": "Proteger sua privacidade", "disclaimer": "Ao aceitar os serviços terceiros, você aceita o uso de cookies em conjunto de tecnologias de rastreamento que lhe são necessárias para funcionar", diff --git a/lang/tarteaucitron.ru.js b/lang/tarteaucitron.ru.js index 995c8c8..7be324d 100644 --- a/lang/tarteaucitron.ru.js +++ b/lang/tarteaucitron.ru.js @@ -13,6 +13,8 @@ tarteaucitron.lang = { "personalize": "Персонализировать", "acceptAll": "Ок, все активировать", "close": "Закрыть", + + "privacyUrl": "Политика конфиденциальности", "all": "Преференция всем сервисам", diff --git a/tarteaucitron.js b/tarteaucitron.js index 4de776e..40db353 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180828003, + "version": 20180829, "cdn": cdn, "user": {}, "lang": {}, @@ -209,7 +209,8 @@ var tarteaucitron = { "cookieslist": true, "handleBrowserDNTRequest": false, "AcceptAllCta" : false, - "moreInfoLink": true + "moreInfoLink": true, + "privacyUrl": "" }, params = tarteaucitron.parameters; @@ -314,6 +315,13 @@ var tarteaucitron = { html += ' '; + + if (tarteaucitron.parameters.privacyUrl !== "") { + html += ' '; + } + html += '
    '; } else { html += '
    '; @@ -326,6 +334,13 @@ var tarteaucitron = { html += ' '; + + if (tarteaucitron.parameters.privacyUrl !== "") { + html += ' '; + } + html += '
    '; html += '
    '; } @@ -462,7 +477,7 @@ var tarteaucitron = { cookie = tarteaucitron.cookie.read(), hostname = document.location.hostname, hostRef = document.referrer.split('/')[2], - isNavigating = (hostRef === hostname) ? true : false, + isNavigating = (hostRef === hostname && window.location.href !== tarteaucitron.parameters.privacyUrl) ? true : false, isAutostart = (!service.needConsent) ? true : false, isWaiting = (cookie.indexOf(service.key + '=wait') >= 0) ? true : false, isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false, From 340f36ce3510528965edc0bca0467ab4d0a6ff7a Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 3 Sep 2018 09:55:45 +0200 Subject: [PATCH 45/96] Better how to install --- README.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 36f03f1..ace3f6d 100644 --- a/README.md +++ b/README.md @@ -32,19 +32,24 @@ Bonus: ``` From 51433bf1ff03f16c485fa3b847fdae6708359be0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 3 Sep 2018 11:10:06 +0200 Subject: [PATCH 46/96] Do not use default value --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 40db353..d93c020 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -307,7 +307,7 @@ var tarteaucitron = { orientation = 'Bottom'; } - if (tarteaucitron.parameters.highPrivacy && !defaults.AcceptAllCta) { + if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) { html += '
    '; html += ' '; html += ' ' + tarteaucitron.lang.alertBigPrivacy; From 4eb6f8c14f274a5ff53abb58bbcd8d2a581a3ea4 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 3 Sep 2018 14:40:08 +0200 Subject: [PATCH 47/96] Add a class to customize the line depending of the status --- tarteaucitron.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index d93c020..2779525 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -660,10 +660,16 @@ var tarteaucitron = { tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + greenDark); tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', greenDark); tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', gray); + + document.getElementById(key + 'Line').classList.add('tarteaucitronIsAllowed'); + document.getElementById(key + 'Line').classList.remove('tarteaucitronIsDenied'); } else if (status === false) { tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + redDark); tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', gray); tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', redDark); + + document.getElementById(key + 'Line').classList.remove('tarteaucitronIsAllowed'); + document.getElementById(key + 'Line').classList.add('tarteaucitronIsDenied'); } // check if all services are allowed From e7af3c67fa36a70ff9b8455946f9905efe10d5ec Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 07:36:43 +0200 Subject: [PATCH 48/96] Visual effect on button --- css/tarteaucitron.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index c35742a..74d9639 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -668,3 +668,9 @@ div.amazon_product { height:240px; width:120px; } + +.tarteaucitronIsAllowed .tarteaucitronDeny { + opacity: 0.5; +}.tarteaucitronIsDenied .tarteaucitronAllow { + opacity: 0.5; +} From 1dae9ace782e9d68331713dccca68351d29fa1de Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 07:48:27 +0200 Subject: [PATCH 49/96] Always show the information text --- css/tarteaucitron.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 74d9639..c256731 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -674,3 +674,17 @@ div.amazon_product { }.tarteaucitronIsDenied .tarteaucitronAllow { opacity: 0.5; } + + +div#tarteaucitronInfo { + display: block!important; + position: initial!important; + text-align: center!important; + max-width: 80%!important; + padding: 15px 0!important; + margin: -10px auto 40px!important; + font-size: 1em!important; + border-bottom: 1px solid; + border-top: 1px solid; + border-color: #555; +} From adc6b4f2ddaa1518e59b4f7652c512965e7d76a5 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 07:52:56 +0200 Subject: [PATCH 50/96] Update tarteaucitron.css --- css/tarteaucitron.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index c256731..228a9d8 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -84,6 +84,7 @@ .tarteaucitronName h2 { max-width: 80%; + font-size: 1.4em!important; } #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk { From b890ed1bb8e948d3ce8e400f5c178966021c9a51 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 07:59:38 +0200 Subject: [PATCH 51/96] Update tarteaucitron.css --- css/tarteaucitron.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 228a9d8..1d9a595 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -251,10 +251,13 @@ h2#tarteaucitronCookiesNumberBis { margin: 15px auto 0; width: 80%; } - -#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronHidden, +.tarteaucitronSelfLink, #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronHidden, #tarteaucitron #tarteaucitronServices .tarteaucitronHidden { background: rgba(51, 51, 51, 0.07); +}a.tarteaucitronSelfLink { + text-align: center!important; + display: block; + padding: 7px!important; } #tarteaucitron #tarteaucitronServices .tarteaucitronHidden { From 43cf19b9396d0997f4f60b6a2f36eb72331fab31 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 08:00:26 +0200 Subject: [PATCH 52/96] Always show the main information text --- tarteaucitron.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 2779525..f5503ad 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180829, + "version": 20180910, "cdn": cdn, "user": {}, "lang": {}, @@ -266,9 +266,19 @@ var tarteaucitron = { html += ' ' + tarteaucitron.lang.close; html += ' '; html += '
  • '; } - html += '
    '; + html += ' '; + html += '
    '; + if (tarteaucitron.parameters.removeCredit === false) { + html += ' 🍋 ' + tarteaucitron.lang.credit + ''; + } html += ' '; html += ' '; html += ''; From f38b4b8a3f7822fdf38aed730382dca77dde06e2 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 12:12:23 +0200 Subject: [PATCH 53/96] Add default background to all policy privacy url --- css/tarteaucitron.css | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 1d9a595..02439d2 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -84,7 +84,6 @@ .tarteaucitronName h2 { max-width: 80%; - font-size: 1.4em!important; } #tarteaucitron #tarteaucitronServices .tarteaucitronLine .tarteaucitronAsk { @@ -251,6 +250,7 @@ h2#tarteaucitronCookiesNumberBis { margin: 15px auto 0; width: 80%; } + .tarteaucitronSelfLink, #tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronHidden, #tarteaucitron #tarteaucitronServices .tarteaucitronHidden { background: rgba(51, 51, 51, 0.07); @@ -452,7 +452,7 @@ h2#tarteaucitronCookiesNumberBis { font-weight: 700; } -#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitronAlertBig #tarteaucitronPrivacyUrl { +#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitron #tarteaucitronPrivacyUrl { background: #008300; color: #fff; cursor: pointer; @@ -463,7 +463,7 @@ h2#tarteaucitronCookiesNumberBis { margin-left: 7px; } -#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPrivacyUrl { +#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitron #tarteaucitronPrivacyUrl { background: #fff; color: #333; font-size: 13px; @@ -672,14 +672,12 @@ div.amazon_product { height:240px; width:120px; } - .tarteaucitronIsAllowed .tarteaucitronDeny { opacity: 0.5; }.tarteaucitronIsDenied .tarteaucitronAllow { opacity: 0.5; } - div#tarteaucitronInfo { display: block!important; position: initial!important; From 4671f04abaf254d01bd0cd0220d72fe9cd4855e2 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 10 Sep 2018 16:20:54 +0200 Subject: [PATCH 54/96] Change position of credit link --- css/tarteaucitron.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 02439d2..ab51810 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -690,3 +690,16 @@ div#tarteaucitronInfo { border-top: 1px solid; border-color: #555; } + +a.tarteaucitronSelfLink { + position: absolute; + left: 0; + right: 0; + padding-top: 13px!important; + display: block; + text-shadow: 0 0 14px white; + text-transform: uppercase; +}.tarteaucitronMainLine h2 { + font-size: 1.2em!important; + margin-top: 4px!important; +} From 842cec6dc85cb0ff23266dc42860316fcc00cc31 Mon Sep 17 00:00:00 2001 From: Yohann bianchi Date: Tue, 11 Sep 2018 10:38:01 +0200 Subject: [PATCH 55/96] =?UTF-8?q?=F0=9F=90=9B=20Fix=20an=20incompatibility?= =?UTF-8?q?=20with=20prototype.js=20<=201.7.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index f5503ad..bfe8cae 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -385,7 +385,7 @@ var tarteaucitron = { // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; - + while (document.body.firstChild) { wrapper.appendChild(document.body.firstChild); @@ -456,7 +456,7 @@ var tarteaucitron = { // create wrapper container var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; - + while (document.body.firstChild) { wrapper.appendChild(document.body.firstChild); @@ -761,7 +761,7 @@ var tarteaucitron = { } document.getElementById('contentWrapper').setAttribute("aria-hidden", "false"); document.getElementsByTagName('body')[0].classList.remove('modal-open'); - + }, "focusTrap": function() { "use strict"; @@ -779,23 +779,23 @@ var tarteaucitron = { if (focusableEls[i].offsetHeight > 0) { filtered.push(focusableEls[i]); } - } + } - firstFocusableEl = filtered[0]; + firstFocusableEl = filtered[0]; lastFocusableEl = filtered[filtered.length - 1]; //loop focus inside tarteaucitron document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) { - + if ( evt.key === 'Tab' || evt.keyCode === 9 ) { - + if ( evt.shiftKey ) /* shift + tab */ { if (document.activeElement === firstFocusableEl) { lastFocusableEl.focus(); evt.preventDefault(); } } else /* tab */ { - if (document.activeElement === lastFocusableEl) { + if (document.activeElement === lastFocusableEl) { firstFocusableEl.focus(); evt.preventDefault(); } @@ -877,7 +877,8 @@ var tarteaucitron = { allDivs = main.childNodes; if (typeof Array.prototype.map === 'function') { - Array.prototype.map.call(main.children, Object).sort(function (a, b) { + var mainChildren = Array.from(main.children); + mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } return 0; From 6bd6555554966d5d2f06328131edd1843e9d831b Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:40:16 +0200 Subject: [PATCH 56/96] Better scroll management --- css/tarteaucitron.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index ab51810..8e68326 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -42,6 +42,30 @@ /*outline: 2px solid #cb3333;*/ } +/*** + * Better scroll management + */ +div#tarteaucitronMainLineOffset { + margin-top: 0!important; +} + +div#tarteaucitronServices { + margin-top: 21px!important; +} + +#tarteaucitronServices::-webkit-scrollbar { + width: 5px; +} + +#tarteaucitronServices::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 0 rgba(0,0,0,0); +} + +#tarteaucitronServices::-webkit-scrollbar-thumb { + background-color: #ddd; + outline: 0px solid slategrey; +} + /*** * Responsive layout for the control panel */ From e1565385557201c1186393faa979d7c40e032abe Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:40:49 +0200 Subject: [PATCH 57/96] Better scroll management --- tarteaucitron.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index f5503ad..1af4756 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180910, + "version": 20180911002, "cdn": cdn, "user": {}, "lang": {}, @@ -289,7 +289,7 @@ var tarteaucitron = { html += ' '; html += ' '; html += ' '; - html += '
    '; + html += '
    '; html += '
      '; for (i = 0; i < cat.length; i += 1) { html += '
    • '; @@ -932,20 +932,20 @@ var tarteaucitron = { if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) { // reset - tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', 'auto'); + tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto'); // calculate mainHeight = document.getElementById('tarteaucitron').offsetHeight; closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight; - headerHeight = document.getElementById('tarteaucitronMainLineOffset').offsetHeight; // apply - servicesHeight = (mainHeight - closeButtonHeight - headerHeight + 1); - tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', servicesHeight + 'px'); + servicesHeight = (mainHeight - closeButtonHeight + 2); + tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px'); + tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto'); } // align the main allow/deny button depending on scrollbar width - if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) { + if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) { // media query if (e[a + 'Width'] <= 479) { @@ -954,7 +954,7 @@ var tarteaucitron = { scrollbarMarginRight = 12; } - scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth; + scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth; scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth; tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px'); } From 63f0ba6866e16cbba1f1ffdb60c686464603c6ca Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:52:18 +0200 Subject: [PATCH 58/96] Restore effect on general allow/deny buttons --- tarteaucitron.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 1af4756..ec2420c 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -696,13 +696,15 @@ var tarteaucitron = { if (nbDenied === 0 && nbPending === 0) { tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark); - tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray); + tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '0.4'); + tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1'); } else if (nbAllowed === 0 && nbPending === 0) { - tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray); + tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '0.4'); + tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1'); tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark); } else { - tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray); - tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray); + tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1'); + tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1'); } // close the alert if all service have been reviewed @@ -877,7 +879,9 @@ var tarteaucitron = { allDivs = main.childNodes; if (typeof Array.prototype.map === 'function') { - Array.prototype.map.call(main.children, Object).sort(function (a, b) { + //Array.prototype.map.call(main.children, Object).sort(function (a, b) { + var mainChildren = Array.from(main.children); + mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } return 0; From 98392f2f40b6d1324193e4a6111ceb6afb3b8a5a Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:56:34 +0200 Subject: [PATCH 59/96] Fix title margin --- css/tarteaucitron.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 8e68326..2b28457 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -210,7 +210,7 @@ div#tarteaucitronServices { #tarteaucitronRoot h2 { display: inline-block; - margin-left: 5px; + margin: 12px 0 0 10px; color: #fff; } From 7aab572bf4b698a26f4b4acf3d1fb734b47e1be0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 11:10:28 +0200 Subject: [PATCH 60/96] Add box shadow to the main panel --- css/tarteaucitron.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 2b28457..68ce9d9 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -66,6 +66,10 @@ div#tarteaucitronServices { outline: 0px solid slategrey; } +div#tarteaucitronServices { + box-shadow: 0 0 35px #575757; +} + /*** * Responsive layout for the control panel */ From 7bccde22c622952f8d3f82daa7e84f89b80b73c0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 13:58:17 +0200 Subject: [PATCH 61/96] Revert #208 Do not work on IE11 --- tarteaucitron.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index d2dcf29..bb9e364 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -880,8 +880,9 @@ var tarteaucitron = { if (typeof Array.prototype.map === 'function') { - var mainChildren = Array.from(main.children); - mainChildren.sort(function (a, b) { + Array.prototype.map.call(main.children, Object).sort(function (a, b) { + //var mainChildren = Array.from(main.children); + //mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } From aa4266896da950a15ab23b7ead9f1205e43bf5e7 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 12 Sep 2018 11:15:01 +0200 Subject: [PATCH 62/96] Improved Spanish translation --- lang/tarteaucitron.es.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lang/tarteaucitron.es.js b/lang/tarteaucitron.es.js index 7b2232a..402b0b5 100644 --- a/lang/tarteaucitron.es.js +++ b/lang/tarteaucitron.es.js @@ -1,14 +1,14 @@ /*global tarteaucitron */ tarteaucitron.lang = { - "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 empezar a personalizar los servicios.", + "adblock": "¡Hola! Este sitio web es transparente y te da la opción de activar los servicios de terceros.", + "adblock_call": "Por favor deshabilita tu AdBlocker para empezar a personalizar los servicios.", "reload": "Actualizar esta página", - "alertBigScroll": "Al continuar para desplazarse,", + "alertBigScroll": "Al continuar desplazándote,", "alertBigClick": "Si continuas navegando por este sitio web,", - "alertBig": "estar permitiendo servicios terceros", + "alertBig": "estás permitiendo servicios terceros", - "alertBigPrivacy": "Este sitio web usa cookies y te permite controlar lo que deseas activar", + "alertBigPrivacy": "Este sitio web usa cookies y te permite controlar las que deseas activar", "alertSmall": "Gestionar servicios", "personalize": "Personalizar", "acceptAll": "OK, aceptar todas", @@ -19,10 +19,10 @@ tarteaucitron.lang = { "all": "Ajustes para todos los servicios", "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 de terceros, estás aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.", "allow": "Permitir", "deny": "Denegar", - "noCookie": "Este servicio no usa cookie.", + "noCookie": "Este servicio no usa cookies.", "useCookie": "Este servicio puede instalar", "useCookieCurrent": "Este servicio ha instalado", "useNoCookie": "Este servicio no ha instalado ninguna cookie.", @@ -30,13 +30,13 @@ tarteaucitron.lang = { "source": "Ver sitio web oficial", "credit": "Gestor de cookies realizada por tarteaucitron.js", - "toggleInfoBox": "Show/hide informations about cookie storage", - "title": "Cookies management panel", - "cookieDetail": "Cookie detail for", - "ourSite": "on our site", - "newWindow": "(new window)", - "allowAll": "Allow all cookies", - "denyAll": "Deny all cookies", + "toggleInfoBox": "Mostrar/ocultar información sobre almacenamiento de cookies", + "title": "Panel de gestión de cookies", + "cookieDetail": "Detalles de las cookies para", + "ourSite": "en nuestra web", + "newWindow": "(ventana nueva)", + "allowAll": "Permitir todas las cookies", + "denyAll": "Denegar todas las cookies", "fallback": "está deshabilitado.", @@ -45,8 +45,8 @@ tarteaucitron.lang = { "details": "Las redes publicitarias pueden generar ingresos mediante la venta de espacios publicitarios en el sitio." }, "analytic": { - "title": "Mediciión de audiencia", - "details": "Los servicios de medición de audiencia se usan para generar asistencia estadísticas útiles para mejorar el sitio." + "title": "Medición de audiencia", + "details": "Los servicios de medición de audiencia se usan para generar estadísticas útiles para mejorar el sitio." }, "social": { "title": "Redes sociales", From ba8bb5cdbf37c9c4430108545e648625c310d806 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 12 Sep 2018 12:57:21 +0200 Subject: [PATCH 63/96] Added matterport service --- tarteaucitron.services.js | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index f5096b2..230ef20 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2326,3 +2326,63 @@ tarteaucitron.services.bingads = { } }; +//Matterport +/* +SERVICE INIT + (tarteaucitron.job = tarteaucitron.job || []).push('matterport'); + +HTML TAG +
      + +DELETE IFRAME + ' + */ +tarteaucitron.services.matterport = { + "key": "matterport", + "type": "other", + "name": "Matterport", + "uri": "https://matterport.com/es/legal/privacy-policy/", + "needConsent": true, + "cookies": ['__cfduid', 'ajs_anonymous_id', 'ajs_group_id', 'ajs_user_id'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['matterport'], function (x) { + var matterport_id = x.getAttribute("matterportID"), + matterport_width = x.getAttribute("width"), + frame_width = 'width=', + matterport_height = x.getAttribute("height"), + frame_height = 'height=', + matterport_parameters = x.getAttribute("parameters"), + matterport_frame; + + if (matterport_id === undefined) { + return ""; + } + if (matterport_width !== undefined) { + frame_width += '"' + matterport_width + '" '; + } else { + frame_width += '"" '; + } + if (matterport_height !== undefined) { + frame_height += '"' + matterport_height + '" '; + } else { + frame_height += '"" '; + } + if (matterport_parameters === undefined) { + return ""; + } + + matterport_frame = ''; + return matterport_frame; + }); + }, + "fallback": function () { + "use strict"; + var id = 'matterport'; + tarteaucitron.fallback(['matterport'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; \ No newline at end of file From 2c539f62cf5bc7464b835cabfa63f172a1875b20 Mon Sep 17 00:00:00 2001 From: Michel Seris Date: Wed, 12 Sep 2018 15:29:10 +0200 Subject: [PATCH 64/96] Add Hubspot service --- tarteaucitron.services.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index f5096b2..be025b9 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1213,6 +1213,20 @@ tarteaucitron.services.googletagmanager = { } }; +// hubspot +tarteaucitron.services.hubspot = { + "key": "hubspot", + "type": "analytic", + "name": "Hubspot", + "uri": "https://legal.hubspot.com/privacy-policy", + "needConsent": true, + "cookies": ['hubspotutk', 'fr', '__hstc', '__hssrc', '__hssc', '__cfduid'], + "js": function () { + "use strict"; + tarteaucitron.addScript('//js.hs-scripts.com/' + tarteaucitron.user.hubspotId + '.js', 'hs-script-loader'); + } +}; + // jsapi tarteaucitron.services.jsapi = { "key": "jsapi", From b0d1b52e22f7e9a110a1bad019ed7011389bf3a6 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 12 Sep 2018 17:46:29 +0200 Subject: [PATCH 65/96] Add cursor:pointer on privacy link --- css/tarteaucitron.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 68ce9d9..a2e187a 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -480,6 +480,10 @@ h2#tarteaucitronCookiesNumberBis { font-weight: 700; } +#tarteaucitronAlertBig #tarteaucitronPrivacyUrl { + cursor: pointer; +} + #tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitron #tarteaucitronPrivacyUrl { background: #008300; color: #fff; From a5bf32ea728a8212ced4ba1a1ab7e831b2f463a7 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 14 Sep 2018 09:28:09 +0200 Subject: [PATCH 66/96] Better default button color --- css/tarteaucitron.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index a2e187a..854c637 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -705,9 +705,16 @@ div.amazon_product { width:120px; } .tarteaucitronIsAllowed .tarteaucitronDeny { - opacity: 0.5; + opacity: 0.4!important; }.tarteaucitronIsDenied .tarteaucitronAllow { - opacity: 0.5; + opacity: 0.4!important; +}.tarteaucitronIsAllowed .tarteaucitronAllow { + opacity: 1!important; +}.tarteaucitronIsDenied .tarteaucitronDeny { + opacity: 1!important; +} +.tarteaucitronLine .tarteaucitronAllow, .tarteaucitronLine .tarteaucitronAllow { + opacity: 0.4; } div#tarteaucitronInfo { From 096065c0bb842a105f374062afa0652190fd9ac9 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 14 Sep 2018 09:30:29 +0200 Subject: [PATCH 67/96] Fix colors of button #213 --- tarteaucitron.js | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index bb9e364..8108076 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180911002, + "version": 20180914, "cdn": cdn, "user": {}, "lang": {}, @@ -333,7 +333,13 @@ var tarteaucitron = { } else { html += '
      '; html += ' '; - html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; + + if (tarteaucitron.parameters.highPrivacy) { + html += ' ' + tarteaucitron.lang.alertBigPrivacy; + } else { + html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; + } + html += ' '; html += ' '; From f6f147ce36c58e02d0a30e2e15eeb16281050597 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Thu, 4 Oct 2018 07:29:15 +0200 Subject: [PATCH 86/96] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ace3f6d..4a91692 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ tarteaucitron.init({ "adblocker": false, /* Show a Warning if an adblocker is detected */ "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */ "highPrivacy": false, /* Disable auto consent */ - "handleBrowserDNTRequest": false, /* If Do Not Track == 1, accept all */ + "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */ "removeCredit": false, /* Remove credit link */ "moreInfoLink": true, /* Show more info link */ From 4c2d0bd68cf2ae78d8ea37b7d552d84448c6b6ba Mon Sep 17 00:00:00 2001 From: BenDz Date: Wed, 10 Oct 2018 10:24:44 +0200 Subject: [PATCH 87/96] First AT Internet SmartTag integration --- tarteaucitron.services.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 0402745..52ba899 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1994,6 +1994,28 @@ tarteaucitron.services.xiti = { } }; +// AT Internet +tarteaucitron.services.atinternet = { + "key": "atinternet", + "type": "analytic", + "name": "AT Internet", + "uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/", + "needConsent": true, + "cookies": ['atidvisitor', 'atreman', 'atredir', 'atsession', 'atuserid'], + "js": function () { + "use strict"; + if (tarteaucitron.user.atLibUrl === undefined) { + return; + } + + tarteaucitron.addScript(tarteaucitron.user.atLibUrl, '', function() { + if (typeof tarteaucitron.user.atMore === 'function') { + tarteaucitron.user.atMore(); + } + }) + } +}; + // youtube tarteaucitron.services.youtube = { "key": "youtube", From 449f7f2f1c65640c45b0169529059fd03bd50c92 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 12 Oct 2018 10:01:56 +0200 Subject: [PATCH 88/96] Create package.json for npm support --- package.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..230bab2 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "tarteaucitronjs", + "version": "1.0.0", + "description": "Comply to the European cookie law", + "dependencies": { + "npm": "^6.4.1" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/AmauriC/tarteaucitron.js.git" + }, + "keywords": [ + "cookie", + "law", + "rgpd", + "gdpr", + "cookie" + ], + "author": "AIC Agency SAS", + "license": "MIT", + "bugs": { + "url": "https://github.com/AmauriC/tarteaucitron.js/issues" + }, + "homepage": "https://github.com/AmauriC/tarteaucitron.js#readme" +} From 872897e760c65c2dd0bf656b8293ddc6b6485fb9 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 15 Oct 2018 16:51:23 +0200 Subject: [PATCH 89/96] Add Twitter Widgets API --- tarteaucitron.services.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index cfb59c0..72f6254 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1270,6 +1270,20 @@ tarteaucitron.services.jsapi = { } }; +// twitterwidgetsapi +tarteaucitron.services.twitterwidgetsapi = { + "key": "twitterwidgetsapi", + "type": "api", + "name": "Twitter Widgets API", + "uri": "https://support.twitter.com/articles/20170514", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs'); + } +}; + // recaptcha tarteaucitron.services.recaptcha = { "key": "recaptcha", From 8688c406486d85c718ba07556593b0071a0d295e Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 15 Oct 2018 17:26:32 +0200 Subject: [PATCH 90/96] Add engage on Twitter Widgets API --- tarteaucitron.services.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 72f6254..5995fed 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1280,7 +1280,13 @@ tarteaucitron.services.twitterwidgetsapi = { "cookies": [], "js": function () { "use strict"; + tarteaucitron.fallback(['tacTwitterAPI'], ''); tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs'); + }, + "fallback": function () { + "use strict"; + var id = 'twitterwidgetsapi'; + tarteaucitron.fallback(['tacTwitterAPI'], tarteaucitron.engage(id)); } }; From e014f1bcb746e04ac1facf50960d42bed2c490bf Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 16 Oct 2018 17:07:11 +0200 Subject: [PATCH 91/96] Fix #243 --- css/tarteaucitron.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 854c637..3afe95b 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -8,7 +8,7 @@ /*** * Reset CSS */ -#tarteaucitronRoot div, #tarteaucitronRoot span, #tarteaucitronRoot applet, #tarteaucitronRoot object, #tarteaucitronRoot iframe, #tarteaucitronRoot h1, #tarteaucitronRoot h2, #tarteaucitronRoot h3, #tarteaucitronRoot h4, #tarteaucitronRoot h5, #tarteaucitronRoot h6, #tarteaucitronRoot p, #tarteaucitronRoot blockquote, #tarteaucitronRoot pre, #tarteaucitronRoot a, #tarteaucitronRoot abbr, #tarteaucitronRoot acronym, #tarteaucitronRoot address, #tarteaucitronRoot big, #tarteaucitronRoot cite, #tarteaucitronRoot code, #tarteaucitronRoot del, #tarteaucitronRoot dfn, #tarteaucitronRoot em, #tarteaucitronRoot img, #tarteaucitronRoot ins, #tarteaucitronRoot kbd, #tarteaucitronRoot q, #tarteaucitronRoot s, #tarteaucitronRoot samp, #tarteaucitronRoot small, #tarteaucitronRoot strike, #tarteaucitronRoot strong, #tarteaucitronRoot sub, #tarteaucitronRoot sup, #tarteaucitronRoot tt, #tarteaucitronRoot var, #tarteaucitronRoot b, #tarteaucitronRoot u, #tarteaucitronRoot i, #tarteaucitronRoot center, #tarteaucitronRoot dl, #tarteaucitronRoot dt, #tarteaucitronRoot dd, #tarteaucitronRoot ol, #tarteaucitronRoot ul, #tarteaucitronRoot li, #tarteaucitronRoot fieldset, #tarteaucitronRoot form, #tarteaucitronRoot label, #tarteaucitronRoot legend, #tarteaucitronRoot table, #tarteaucitronRoot caption, #tarteaucitronRoot tbody, #tarteaucitronRoot tfoot, #tarteaucitronRoot thead, #tarteaucitronRoot tr, #tarteaucitronRoot th, #tarteaucitronRoot td,article, #tarteaucitronRoot aside, #tarteaucitronRoot canvas, #tarteaucitronRoot details, #tarteaucitronRoot embed, #tarteaucitronRoot figure, #tarteaucitronRoot figcaption, #tarteaucitronRoot footer, #tarteaucitronRoot header, #tarteaucitronRoot hgroup, #tarteaucitronRoot menu, #tarteaucitronRoot nav, #tarteaucitronRoot output, #tarteaucitronRoot ruby, #tarteaucitronRoot section, #tarteaucitronRoot summary, #tarteaucitronRoot time, #tarteaucitronRoot mark, #tarteaucitronRoot audio, #tarteaucitronRoot video { +#tarteaucitronRoot div, #tarteaucitronRoot span, #tarteaucitronRoot applet, #tarteaucitronRoot object, #tarteaucitronRoot iframe, #tarteaucitronRoot h1, #tarteaucitronRoot h2, #tarteaucitronRoot h3, #tarteaucitronRoot h4, #tarteaucitronRoot h5, #tarteaucitronRoot h6, #tarteaucitronRoot p, #tarteaucitronRoot blockquote, #tarteaucitronRoot pre, #tarteaucitronRoot a, #tarteaucitronRoot abbr, #tarteaucitronRoot acronym, #tarteaucitronRoot address, #tarteaucitronRoot big, #tarteaucitronRoot cite, #tarteaucitronRoot code, #tarteaucitronRoot del, #tarteaucitronRoot dfn, #tarteaucitronRoot em, #tarteaucitronRoot img, #tarteaucitronRoot ins, #tarteaucitronRoot kbd, #tarteaucitronRoot q, #tarteaucitronRoot s, #tarteaucitronRoot samp, #tarteaucitronRoot small, #tarteaucitronRoot strike, #tarteaucitronRoot strong, #tarteaucitronRoot sub, #tarteaucitronRoot sup, #tarteaucitronRoot tt, #tarteaucitronRoot var, #tarteaucitronRoot b, #tarteaucitronRoot u, #tarteaucitronRoot i, #tarteaucitronRoot center, #tarteaucitronRoot dl, #tarteaucitronRoot dt, #tarteaucitronRoot dd, #tarteaucitronRoot ol, #tarteaucitronRoot ul, #tarteaucitronRoot li, #tarteaucitronRoot fieldset, #tarteaucitronRoot form, #tarteaucitronRoot label, #tarteaucitronRoot legend, #tarteaucitronRoot table, #tarteaucitronRoot caption, #tarteaucitronRoot tbody, #tarteaucitronRoot tfoot, #tarteaucitronRoot thead, #tarteaucitronRoot tr, #tarteaucitronRoot th, #tarteaucitronRoot td, #tarteaucitronRoot article, #tarteaucitronRoot aside, #tarteaucitronRoot canvas, #tarteaucitronRoot details, #tarteaucitronRoot embed, #tarteaucitronRoot figure, #tarteaucitronRoot figcaption, #tarteaucitronRoot footer, #tarteaucitronRoot header, #tarteaucitronRoot hgroup, #tarteaucitronRoot menu, #tarteaucitronRoot nav, #tarteaucitronRoot output, #tarteaucitronRoot ruby, #tarteaucitronRoot section, #tarteaucitronRoot summary, #tarteaucitronRoot time, #tarteaucitronRoot mark, #tarteaucitronRoot audio, #tarteaucitronRoot video { margin: 0; padding: 0; border: 0; From 758b8fc7f2b94044c32d2924e0934ddce9505ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Fix?= Date: Sat, 20 Oct 2018 07:27:55 +0200 Subject: [PATCH 92/96] Ability to use an external CSS - Added option to initialization: useExternalCSS --- tarteaucitron.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 9c00d3e..e989f11 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -218,7 +218,8 @@ var tarteaucitron = { "handleBrowserDNTRequest": false, "AcceptAllCta" : false, "moreInfoLink": true, - "privacyUrl": "" + "privacyUrl": "", + "useExternalCss": false }, params = tarteaucitron.parameters; @@ -238,12 +239,14 @@ var tarteaucitron = { tarteaucitron.highPrivacy = tarteaucitron.parameters.highPrivacy; tarteaucitron.handleBrowserDNTRequest = tarteaucitron.parameters.handleBrowserDNTRequest; - // Step 1: load css - linkElement.rel = 'stylesheet'; - linkElement.type = 'text/css'; - linkElement.href = cdn + 'css/tarteaucitron.css?v=' + tarteaucitron.version; - document.getElementsByTagName('head')[0].appendChild(linkElement); + // Step 1: load css + if ( !tarteaucitron.parameters.useExternalCss ) { + linkElement.rel = 'stylesheet'; + linkElement.type = 'text/css'; + linkElement.href = cdn + 'css/tarteaucitron.css?v=' + tarteaucitron.version; + document.getElementsByTagName('head')[0].appendChild(linkElement); + } // Step 2: load language and services tarteaucitron.addScript(pathToLang, '', function () { From 6942489af2ce684208ccffc0cb7866543f451982 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 23 Oct 2018 09:31:20 +0200 Subject: [PATCH 93/96] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a91692..ad61f45 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/SASAICAGENCY) [![](https://data.jsdelivr.com/v1/package/gh/AmauriC/tarteaucitron.js/badge)](https://www.jsdelivr.com/package/gh/AmauriC/tarteaucitron.js) +[![](https://data.jsdelivr.com/v1/package/gh/AmauriC/tarteaucitron.js/badge)](https://www.jsdelivr.com/package/gh/AmauriC/tarteaucitron.js) +[![npm](https://img.shields.io/npm/v/tarteaucitronjs.svg)](https://www.npmjs.com/package/tarteaucitronjs) ![GitHub contributors](https://img.shields.io/github/contributors/AmauriC/tarteaucitron.js.svg) + +[![Buy me a coffee](https://img.shields.io/badge/buy%20me-a%20coffee-ff69b4.svg)](https://www.paypal.me/SASAICAGENCY) From 481a70d5e9ef5b67bf85c251474ad377a2397d49 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 23 Oct 2018 09:33:13 +0200 Subject: [PATCH 94/96] Update README.md --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index ad61f45..d0c7fc3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ [![](https://data.jsdelivr.com/v1/package/gh/AmauriC/tarteaucitron.js/badge)](https://www.jsdelivr.com/package/gh/AmauriC/tarteaucitron.js) -[![npm](https://img.shields.io/npm/v/tarteaucitronjs.svg)](https://www.npmjs.com/package/tarteaucitronjs) ![GitHub contributors](https://img.shields.io/github/contributors/AmauriC/tarteaucitron.js.svg) - -[![Buy me a coffee](https://img.shields.io/badge/buy%20me-a%20coffee-ff69b4.svg)](https://www.paypal.me/SASAICAGENCY) - - +[![npm](https://img.shields.io/npm/v/tarteaucitronjs.svg)](https://www.npmjs.com/package/tarteaucitronjs) [![GitHub contributors](https://img.shields.io/github/contributors/AmauriC/tarteaucitron.js.svg)](https://github.com/AmauriC/tarteaucitron.js/graphs/contributors) tarteaucitron.js ================ From 7c5b29b27d969b09f35a365a2489f026a57b98fe Mon Sep 17 00:00:00 2001 From: IOWEB TECHNOLOGIES Date: Tue, 23 Oct 2018 12:45:34 +0300 Subject: [PATCH 95/96] add greek translation --- lang/tarteaucitron.el.js | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 lang/tarteaucitron.el.js diff --git a/lang/tarteaucitron.el.js b/lang/tarteaucitron.el.js new file mode 100644 index 0000000..30b2b41 --- /dev/null +++ b/lang/tarteaucitron.el.js @@ -0,0 +1,75 @@ +/*global tarteaucitron */ +tarteaucitron.lang = { + "adblock": "Γεια σας! Ο ιστότοπος αυτός σας επιτρέπει να επιλέξετε τις υπηρεσίες που παρέχονται από τρίτους που θα θέλατε να επιτρέψετε.", + "adblock_call": "Παρακαλώ απενεργοποιήστε τα προγράμματα απόρριψης διαφημίσεων για να ξεκινήσετε τις τροποποιήσεις σας.", + "reload": "Ανανέωση της σελίδας", + + "alertBigScroll": "Συνεχίζοντας την ανάγνωση (κύλιση) της σελίδας,", + "alertBigClick": "Αν συνεχίσετε την περιήγηση σας στον ιστότοπο,", + "alertBig": "επιτρέπετε όλες τις υπηρεσίες που παρέχονται από τρίτους", + + "alertBigPrivacy": "Ο ιστότοπος αυτός χρησιμοποιεί "μπισκότα" (cookies) και σας επιτρέπει να ελέγξετε τι θέλετε να ενεργοποιήσετε", + "alertSmall": "Διαχείριση υπηρεσιών", + "personalize": "Εξατομίκευση", + "acceptAll": "OK, αποδοχή όλων", + "close": "Κλείσιμο", + + "privacyUrl": "Πολιτική απορρήτου", + + "all": "Προτίμηση για όλες τις υπηρεσίες", + + "info": "Προστασία των προσωπικών σας δεδομένων", + "disclaimer": "Επιτρέποντας αυτές τις υπηρεσίες που παρέχονται από τρίτους, αποδέχεστε τα "μπισκότα" (cookies) τους καθώς και τη χρήση τεχνολογιών παρακολούθησης που είναι απαραίτητες για τη λειτουργία τους.", + "allow": "Επέτρεψε", + "deny": "Απόρριψε", + "noCookie": "Η υπηρεσία αυτή δε χρησιμοποιεί "μπισκότα" (cookies).", + "useCookie": "Η υπηρεσία αυτή μπορεί να αποθηκεύσει ", + "useCookieCurrent": "Η υπηρεσία αυτή έχει αποθηκεύσει ", + "useNoCookie": "Η υπηρεσία αυτή δεν έχει αποθηκεύσει κανένα "μπισκότο" (cookie).", + "more": "Διαβάστε περισσότερα", + "source": "Δείτε τον επίσημο ιστότοπο", + "credit": "Cookies manager by tarteaucitron.js", + + "toggleInfoBox": "Προβολή/Απόκρυψη πληροφοριών για την αποθήκευση "μπισκότων" (cookies)", + "title": "Πίνακας διαχείρισης "Μπισκότων" (Cookies)", + "cookieDetail": "Λεπτομέρειες "μπισκότων" (cookies) για", + "ourSite": "στον ιστότοπο μας", + "newWindow": "(νέο παράθυρο)", + "allowAll": "Επέτρεψε όλα τα "μπισκότα" (cookies)", + "denyAll": "Απόρριψε όλα τα "μπισκότα" (cookies)", + + "fallback": "είναι απενεργοποιημένο.", + + "ads": { + "title": "Διαφημιστικό Δίκτυο", + "details": "Τα διαφημιστικά δίκτυα μπορούν να αποφέρουν εισόδημα πουλώντας διαφημιστικό χώρο στη σελίδα." + }, + "analytic": { + "title": "Μετρήσεις κοινού", + "details": "Οι υπηρεσίες μέτρησης κοινού χρησιμοποιούνται για τον υπολογισμό χρήσιμων στατιστικών επισκεψιμότητας του ιστοτόπου για την βελτίωση του." + }, + "social": { + "title": "Κοινωνικά δίκτυα", + "details": "Τα κοινωνικά δίκτυα μπορούν να βελτιώσουν την χρηστικότητα του ιστοτόπου και να τον προωθήσουν μέσω κοινοποιήσεων." + }, + "video": { + "title": "Βίντεο", + "details": "Υπηρεσίες διαμοιρασμού βίντεο που βοηθούν να παρουσιαστεί πλούσιο περιεχόμενο στον ιστότοπο και να αυξήσουν την αναγνωρισιμότητα του." + }, + "comment": { + "title": "Σχόλια", + "details": "Οι διαχειριστές σχολίων βοηθούν την καταχώρηση σχολίων και προστατεύουν από κακόβουλες ενέργειες." + }, + "support": { + "title": "Υποστήριξη", + "details": "Οι υποστηρικτικές υπηρεσίες σας επιτρέπουν να επικονωνείτε με την ομάδα υποστήριξης του ιστοτόπου και να βοηθήσετε στην βελτίωση του." + }, + "api": { + "title": "APIs", + "details": "Τα API χρησιμοποιούνται για την φόρτωση προγραμμάτων: αναγνώρισης τοποθεσίας, μηχανών αναζήτησης, μεταφράσεων, ..." + }, + "other": { + "title": "Λοιπές υπηρεσίες", + "details": "Υπηρεσίες που παρουσιάζουν άλλο περιεχόμενο." + } +}; From 49dbaa32ff518b11c21cabe31c13cd78aa160eb4 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 23 Oct 2018 15:39:55 +0200 Subject: [PATCH 96/96] Add Greek translation --- tarteaucitron.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index e989f11..a450d06 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20181003, + "version": 20181023, "cdn": cdn, "user": {}, "lang": {}, @@ -1227,7 +1227,7 @@ var tarteaucitron = { "use strict"; if (!navigator) { return 'en'; } - var availableLanguages = 'cs,en,fr,es,it,de,nl,pt,pl,ru', + var availableLanguages = 'cs,en,fr,es,it,de,nl,pt,pl,ru,el', defaultLanguage = 'en', lang = navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null, @@ -1266,6 +1266,8 @@ var tarteaucitron = { return 'pt_PT'; } else if (userLanguage === 'nl') { return 'nl_NL'; + } else if (userLanguage === 'el') { + return 'el_EL'; } else { return 'en_US'; }