From fa024eb3f39e6d3efdee80e7de62e1497e36dc50 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 26 Apr 2018 16:13:28 +0200 Subject: [PATCH 001/124] adding webmecanik service --- tarteaucitron.services.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..48e14ea 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1848,3 +1848,26 @@ tarteaucitron.services.facebookpixel = { } }; +// webmecanik +tarteaucitron.services.webmecanik = { + "key": "webmecanik", + "type": "analytic", + "name": "Webmecanik", + "uri": "https://webmecanik.com/tos", + "needConsent": true, + "cookies": ['mtc_id', 'mtc_sid'], + "js": function () { + "use strict"; + if (tarteaucitron.user.webmecanikurl === undefined) { + return; + } + window['WebmecanikTrackingObject'] = 'mt'; + window['mt'] = window['mt'] || function() { + (window['mt'].q = window['mt'].q || []).push(arguments); + }; + + tarteaucitron.addScript(tarteaucitron.user.webmecanikurl, '', function() { + mt('send', 'pageview'); + }); + } +}; \ No newline at end of file From 24fb4ed4005e84a8f1b1e54c6f1f1513537a6774 Mon Sep 17 00:00:00 2001 From: Norman Pracht - Webmecanik Date: Thu, 26 Apr 2018 16:43:13 +0200 Subject: [PATCH 002/124] update readme to add Webmecanik automation also i noticed that mautic is missing in the list. i created a new category :) --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cbfb3a..6df3e5e 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,11 @@ Bonus: * Comment * Disqus * Facebook (commentaire) - + +* Marketing Automation & CRM + * Mautic + * Webmecanik Automation + * Social network * AddThis * AddToAny (feed) From 263fa2fd4696562f18a7b7eee63e90d87809b6f1 Mon Sep 17 00:00:00 2001 From: Encre Informatique Date: Tue, 22 May 2018 12:26:07 -0300 Subject: [PATCH 003/124] Fixed #93 : dutch translation The Dutch translation has been added according to the issue. Beware I cannot check the translation itself. The nl locale has been added to the main script. --- lang/tarteaucitron.nl.js | 65 ++++++++++++++++++++++++++++++++++++++++ tarteaucitron.js | 4 ++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 lang/tarteaucitron.nl.js diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js new file mode 100644 index 0000000..f5f6fa7 --- /dev/null +++ b/lang/tarteaucitron.nl.js @@ -0,0 +1,65 @@ +/*global tarteaucitron */ +tarteaucitron.lang = { + "adblock": "Hallo! Deze site is transparant en laat u de services van derden kiezen die u wilt toestaan.", + "adblock_call": "Schakel uw adblocker uit om te beginnen met aanpassen.", + "reload": "Ververs de pagina", + + "alertBigScroll": "Door te blijven scrollen,", + "alertBigClick": "Als je doorgaat met het surfen op deze website,", + "alertBig": "staat je alle diensten van derden toe", + + "alertBigPrivacy": "Deze site maakt gebruik van cookies en geeft u controle over wat u wilt activeren", + "alertSmall": "Beheer instellingen", + "personalize": "Personaliseer", + "acceptAll": "OK, accepteer alle", + "close": "Sluit", + + "all": "Voorkeur voor alle diensten", + + "info": "Bescherming van uw privacy", + "disclaimer": "Door deze services van derden toe te staan, accepteert u hun cookies en het gebruik van trackingtechnologieën die nodig zijn voor hun goede werking.", + "allow": "Toestaan", + "deny": "Weigeren", + "noCookie": "Deze service gebruikt geen cookie", + "useCookie": "Deze service kan worden geïnstalleerd", + "useCookieCurrent": "Deze service is geïnstalleerd", + "useNoCookie": "Deze service heeft geen cookies geïnstalleerd.", + "more": "Lees meer", + "source": "Bekijk de officiële website", + "credit": "Cookie manager mogelijk gemakt door tarteaucitron.js", + + "fallback": "is uitgeschakeld.", + + "ads": { + "title": "Advertentienetwerk", + "details": "Advertentienetwerken kunnen inkomsten genereren door advertentieruimte op de site te verkopen." + }, + "analytic": { + "title": "Bezoekers meting", + "details": "De bezoekersdiensten voor het publiek worden gebruikt om nuttige statistieken te genereren om de site te verbeteren." + }, + "social": { + "title": "Sociale netwerken", + "details": "Sociale netwerken kunnen de bruikbaarheid van de site verbeteren en helpen deze via de shares te promoten." + }, + "video": { + "title": "Videos", + "details": "Video sharing-services helpen om rich media op de site toe te voegen en de zichtbaarheid ervan te vergroten." + }, + "comment": { + "title": "Comments", + "details": "Commentsmanagers faciliteren het indienen van opmerkingen en het bestrijden van spam." + }, + "support": { + "title": "Support", + "details": "Support diensten stellen u in staat contact op te nemen met het team van de site en helpen het te verbeteren." + }, + "api": { + "title": "APIs", + "details": "APIs worden gebruikt om scripts te laden: geolocatie, zoekmachines, vertalingen, ..." + }, + "other": { + "title": "Overig", + "details": "Diensten om webinhoud weer te geven." + } +}; diff --git a/tarteaucitron.js b/tarteaucitron.js index 88cd673..cfe1cb5 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -1040,7 +1040,7 @@ var tarteaucitron = { "use strict"; if (!navigator) { return 'en'; } - var availableLanguages = 'cs,en,fr,es,it,de,pt,pl,ru', + var availableLanguages = 'cs,en,fr,es,it,de,nl,pt,pl,ru', defaultLanguage = 'en', lang = navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null, @@ -1077,6 +1077,8 @@ var tarteaucitron = { return 'it_IT'; } else if (userLanguage === 'pt') { return 'pt_PT'; + } else if (userLanguage === 'nl') { + return 'nl_NL'; } else { return 'en_US'; } From 7143dc9258853a103b0e7c938992a6fbea4dd0c0 Mon Sep 17 00:00:00 2001 From: Fabian Christen Date: Fri, 25 May 2018 11:12:56 +0200 Subject: [PATCH 004/124] Add service for Issuu (www.issuu.com) Iframe embed --- README.md | 1 + tarteaucitron.services.js | 139 +++++++++++++++++++++++++------------- 2 files changed, 93 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 2cbfb3a..e7b2fc4 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ Bonus: * SlideShare * Vimeo * YouTube + * Issuu ## Visitors outside the EU diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..08e49bd 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -15,7 +15,7 @@ tarteaucitron.services.iframe = { var width = x.getAttribute("width"), height = x.getAttribute("height"), url = x.getAttribute("data-url"); - + return ''; }); }, @@ -143,7 +143,7 @@ tarteaucitron.services.amazon = { productId = x.getAttribute("productid"), url = '//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=' + tarteaucitron.getLanguage().toUpperCase() + '&source=ss&ref=ss_til&ad_type=product_link&tracking_id=' + amazonId + '&marketplace=amazon®ion=' + tarteaucitron.getLanguage().toUpperCase() + '&placement=' + productId + '&asins=' + productId + '&show_border=true&link_opens_in_new_window=true', iframe = ''; - + return iframe; }); }, @@ -169,7 +169,7 @@ tarteaucitron.services.calameo = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = '//v.calameo.com/?bkcode=' + id; - + return ''; }); }, @@ -227,13 +227,13 @@ tarteaucitron.services.clicmanager = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = '//ads.clicmanager.fr/exe.php?'; uri += 'c=' + document.getElementById(uniqIds[i]).getAttribute('c') + '&'; uri += 's=' + document.getElementById(uniqIds[i]).getAttribute('s') + '&'; uri += 't=' + document.getElementById(uniqIds[i]).getAttribute('t'); - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -254,11 +254,11 @@ tarteaucitron.services.crazyegg = { "cookies": [], "js": function () { "use strict"; - + if (tarteaucitron.user.crazyeggId === undefined) { return; } - + tarteaucitron.addScript('//script.crazyegg.com/pages/scripts/' + tarteaucitron.user.crazyeggId.substr(0, 4) + '/' + tarteaucitron.user.crazyeggId.substr(4, 4) + '.js'); } }; @@ -283,7 +283,7 @@ tarteaucitron.services.criteo = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = '//cas.criteo.com/delivery/ajs.php?'; uri += 'zoneid=' + document.getElementById(uniqIds[i]).getAttribute('zoneid'); @@ -296,7 +296,7 @@ tarteaucitron.services.criteo = { uri += (document.context !== undefined) ? '&context=' + encodeURI(document.context) : ''; uri += ((document.MAX_ct0 !== undefined) && (document.MAX_ct0.substring(0, 4) === 'http')) ? '&ct0=' + encodeURI(document.MAX_ct0) : ''; uri += (document.mmm_fo !== undefined) ? '&mmm_fo=1' : ''; - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -325,7 +325,7 @@ tarteaucitron.services.dailymotion = { frame_height = 'height=', video_frame, params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay"); - + if (video_id === undefined) { return ""; } @@ -376,7 +376,7 @@ tarteaucitron.services.datingaffiliation = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = 'http://www.tools-affil2.com/rotaban/ban.php?' + comfrom; - + return ''; }); }, @@ -410,7 +410,7 @@ tarteaucitron.services.datingaffiliationpopup = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = 'http://www.promotools.biz/da/popunder/script.php?'; uri += 'comfrom=' + document.getElementById(uniqIds[i]).getAttribute('comfrom') + '&'; @@ -433,7 +433,7 @@ tarteaucitron.services.datingaffiliationpopup = { uri += 'snd=' + document.getElementById(uniqIds[i]).getAttribute('snd') + '&'; uri += 'aabd=' + document.getElementById(uniqIds[i]).getAttribute('aabd') + '&'; uri += 'aabs=' + document.getElementById(uniqIds[i]).getAttribute('aabs'); - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -463,7 +463,7 @@ tarteaucitron.services.disqus = { "fallback": function () { "use strict"; var id = 'disqus'; - + if (document.getElementById('disqus_thread')) { document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id); } @@ -638,7 +638,7 @@ tarteaucitron.services.getplus = { if (tarteaucitron.user.getplusId === undefined) { return; } - + window.webleads_site_ids = window.webleads_site_ids || []; window.webleads_site_ids.push(tarteaucitron.user.getplusId); tarteaucitron.addScript('//stats.webleads-tracker.com/js'); @@ -753,7 +753,7 @@ tarteaucitron.services.adsensesearchresult = { "fallback": function () { "use strict"; var id = 'adsensesearchresult'; - + if (document.getElementById('gcse_searchresults')) { document.getElementById('gcse_searchresults').innerHTML = tarteaucitron.engage(id); } @@ -773,7 +773,7 @@ tarteaucitron.services.googleadwordsconversion = { if (tarteaucitron.user.adwordsconversionId === undefined) { return; } - + tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () { window.google_trackConversion({ google_conversion_id: tarteaucitron.user.adwordsconversionId, @@ -805,7 +805,7 @@ tarteaucitron.services.googleadwordsremarketing = { if (tarteaucitron.user.adwordsremarketingId === undefined) { return; } - + tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () { window.google_trackConversion({ google_conversion_id: tarteaucitron.user.adwordsremarketingId, @@ -828,7 +828,7 @@ tarteaucitron.services.gajs = { window._gaq = window._gaq || []; window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]); window._gaq.push(['_trackPageview']); - + tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () { if (typeof tarteaucitron.user.gajsMore === 'function') { tarteaucitron.user.gajsMore(); @@ -853,7 +853,7 @@ tarteaucitron.services.analytics = { window.ga.q.push(arguments); }; window.ga.l = new Date(); - + tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () { ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000}); ga('send', 'pageview'); @@ -875,12 +875,12 @@ tarteaucitron.services.gtag = { "js": function () { "use strict"; window.dataLayer = window.dataLayer || []; - + tarteaucitron.addScript('//www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () { function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', tarteaucitron.user.gtagUa); - + if (typeof tarteaucitron.user.gtagMore === 'function') { tarteaucitron.user.gtagMore(); } @@ -915,7 +915,7 @@ tarteaucitron.services.googlemaps = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { mapOptions = { zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10), @@ -1006,12 +1006,12 @@ tarteaucitron.services.mautic = { if (tarteaucitron.user.mauticurl === undefined) { return; } - + window['MauticTrackingObject'] = 'mt'; window['mt'] = window['mt'] || function() { (window['mt'].q = window['mt'].q || []).push(arguments); }; - + tarteaucitron.addScript(tarteaucitron.user.mauticurl, '', function() { mt('send', 'pageview'); }); @@ -1031,7 +1031,7 @@ tarteaucitron.services.microsoftcampaignanalytics = { if (tarteaucitron.user.microsoftcampaignanalyticsUUID === undefined) { return; } - + tarteaucitron.addScript('//flex.atdmt.com/mstag/site/' + tarteaucitron.user.microsoftcampaignanalyticsUUID + '/mstag.js', 'mstag_tops', function () { window.mstag = {loadTag : function () {}, time : (new Date()).getTime()}; window.mstag.loadTag("analytics", {dedup: "1", domainId: tarteaucitron.user.microsoftcampaignanalyticsdomainId, type: "1", actionid: tarteaucitron.user.microsoftcampaignanalyticsactionId}); @@ -1078,14 +1078,14 @@ tarteaucitron.services.prelinker = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = 'http://promo.easy-dating.org/banner/index?'; uri += 'site_id=' + document.getElementById(uniqIds[i]).getAttribute('siteId') + '&'; uri += 'banner_id=' + document.getElementById(uniqIds[i]).getAttribute('bannerId') + '&'; uri += 'default_language=' + document.getElementById(uniqIds[i]).getAttribute('defaultLanguage') + '&'; uri += 'tr4ck=' + document.getElementById(uniqIds[i]).getAttribute('trackrt'); - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -1111,7 +1111,7 @@ tarteaucitron.services.prezi = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = 'https://prezi.com/embed/' + id + '/?bgcolor=ffffff&lock_to_path=0&autoplay=0&autohide_ctrls=0'; - + return ''; }); }, @@ -1145,12 +1145,12 @@ tarteaucitron.services.pubdirecte = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = '//www.pubdirecte.com/script/banniere.php?'; uri += 'id=' + document.getElementById(uniqIds[i]).getAttribute('pid') + '&'; uri += 'ref=' + document.getElementById(uniqIds[i]).getAttribute('ref'); - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -1174,7 +1174,7 @@ tarteaucitron.services.purechat = { if (tarteaucitron.user.purechatId === undefined) { return; } - + tarteaucitron.addScript('//app.purechat.com/VisitorWidget/WidgetScript', '', function () { try { window.w = new PCWidget({ c: tarteaucitron.user.purechatId, f: true }); @@ -1196,7 +1196,7 @@ tarteaucitron.services.shareaholic = { if (tarteaucitron.user.shareaholicSiteId === undefined) { return; } - + tarteaucitron.fallback(['shareaholic-canvas'], ''); tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () { try { @@ -1230,7 +1230,7 @@ tarteaucitron.services.shareasale = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = 'https://shareasale.com/sale.cfm?'; uri += 'amount=' + document.getElementById(uniqIds[i]).getAttribute('amount') + '&'; @@ -1240,7 +1240,7 @@ tarteaucitron.services.shareasale = { uri += 'perlead=' + document.getElementById(uniqIds[i]).getAttribute('perlead') + '&'; uri += 'perhit=' + document.getElementById(uniqIds[i]).getAttribute('perhit') + '&'; uri += 'merchantID=' + document.getElementById(uniqIds[i]).getAttribute('merchantID'); - + document.getElementById(uniqIds[i]).innerHTML = ''; } }, @@ -1266,12 +1266,12 @@ tarteaucitron.services.sharethis = { } var switchTo5x = true, uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js'; - + tarteaucitron.fallback(['tacSharethis'], ''); tarteaucitron.addScript(uri, '', function () { stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false}); }); - + if (tarteaucitron.isAjax === true) { if (typeof stButtons !== "undefined") { stButtons.locateElements(); @@ -1300,7 +1300,7 @@ tarteaucitron.services.slideshare = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = '//www.slideshare.net/slideshow/embed_code/' + id; - + return ''; }); }, @@ -1334,7 +1334,7 @@ tarteaucitron.services.statcounter = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { tarteaucitron.makeAsync.init(uri, uniqIds[i]); } @@ -1414,11 +1414,11 @@ tarteaucitron.services.twenga = { "cookies": [], "js": function () { "use strict"; - + if (tarteaucitron.user.twengaId === undefined || tarteaucitron.user.twengaLocale === undefined) { return; } - + tarteaucitron.addScript('//tracker.twenga.' + tarteaucitron.user.twengaLocale + '/st/tracker_' + tarteaucitron.user.twengaId + '.js'); } }; @@ -1471,7 +1471,7 @@ tarteaucitron.services.twitterembed = { html += '>'; return html; }); - + tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs', function () { for (i = 0; i < uniqIds.length; i += 1) { e = document.getElementById(uniqIds[i]); @@ -1555,7 +1555,7 @@ tarteaucitron.services.vimeo = { video_height = x.getAttribute("height"), frame_height = 'height=', video_frame; - + if (video_id === undefined) { return ""; } @@ -1676,10 +1676,10 @@ tarteaucitron.services.xiti = { Xt_s = screen; Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth; } - + div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">'; document.getElementsByTagName('body')[0].appendChild(div.firstChild); - + if (typeof tarteaucitron.user.xitiMore === 'function') { tarteaucitron.user.xitiMore(); } @@ -1704,7 +1704,7 @@ tarteaucitron.services.youtube = { frame_height = 'height=', video_frame, params = 'theme=' + x.getAttribute("theme") + '&rel=' + x.getAttribute("rel") + '&controls=' + x.getAttribute("controls") + '&showinfo=' + x.getAttribute("showinfo") + '&autoplay=' + x.getAttribute("autoplay"); - + if (video_id === undefined) { return ""; } @@ -1751,7 +1751,7 @@ tarteaucitron.services.youtubeplaylist = { frame_height = 'height=', video_frame, params = 'theme=' + x.getAttribute("theme") + '&rel=' + x.getAttribute("rel") + '&controls=' + x.getAttribute("controls") + '&showinfo=' + x.getAttribute("showinfo") + '&autoplay=' + x.getAttribute("autoplay"); - + if (playlist_id === undefined) { return ""; } @@ -1848,3 +1848,48 @@ tarteaucitron.services.facebookpixel = { } }; +//Issuu +tarteaucitron.services.issuu = { + "key": "issuu", + "type": "other", + "name": "Issuu", + "uri": "https://issuu.com/legal/privacy", + "needConsent": true, + "cookies": ['__qca', 'iutk', 'mc'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['issuu_player'], function (x) { + var issuu_id = x.getAttribute("issuuID"), + issuu_width = x.getAttribute("width"), + frame_width = 'width=', + issuu_height = x.getAttribute("height"), + frame_height = 'height=', + issuu_frame; + + if (issuu_id === undefined) { + return ""; + } + if (issuu_width !== undefined) { + frame_width += '"' + issuu_width + '" '; + } else { + frame_width += '"" '; + } + if (issuu_height !== undefined) { + frame_height += '"' + issuu_height + '" '; + } else { + frame_height += '"" '; + } + issuu_frame = ''; + return issuu_frame; + }); + }, + "fallback": function () { + "use strict"; + var id = 'issuu'; + tarteaucitron.fallback(['issuu_player'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; From da6b132f488b45a06140c0346ead1f2fb821ff0f Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Sat, 2 Jun 2018 23:19:51 +0200 Subject: [PATCH 005/124] Added iframe google maps with search query --- tarteaucitron.services.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 50f07dc..35a6c05 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -937,6 +937,38 @@ tarteaucitron.services.googlemaps = { } }; +// googlemaps search +tarteaucitron.services.googlemapssearch = { + "key": "googlemapssearch", + "type": "api", + "name": "Google Maps Seard API", + "uri": "http://www.google.com/ads/preferences/", + "needConsent": true, + "cookies": ['nid'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['googlemapssearch'], function (x) { + var width = x.getAttribute("width"), + height = x.getAttribute("height"), + // url = x.getAttribute("data-url"); + query = escape(x.getAttribute("data-search")), + key = x.getAttribute("data-api-key"); + + // return ''; + return ' ' + }); + }, + "fallback": function () { + "use strict"; + var id = 'googlemapssearch'; + tarteaucitron.fallback(['googlemapssearch'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; + // google tag manager tarteaucitron.services.googletagmanager = { "key": "googletagmanager", From cf3a58fa86974eb5cd4fddd30c23ab437e2687d5 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Sun, 3 Jun 2018 13:10:37 +0200 Subject: [PATCH 006/124] added customisation of time cookie expire --- tarteaucitron.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 0cada71..d8d2c14 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -6,6 +6,8 @@ var scripts = document.getElementsByTagName('script'), cdn = path.split('/').slice(0, -1).join('/') + '/', alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch, tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage, + tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire, + timeExipre = 31536000000, tarteaucitronProLoadServices, tarteaucitronNoAdBlocker = false; @@ -860,9 +862,15 @@ var tarteaucitron = { "owner": {}, "create": function (key, status) { "use strict"; + + if (tarteaucitronForceExpire !== '') { + // The number of day cann't be higher than 1 year + timeExipre = (tarteaucitronForceExpire > 365) ? 31536000000 : tarteaucitronForceExpire * 86400000; // Multiplication to tranform the number of days to milliseconds + } + var d = new Date(), time = d.getTime(), - expireTime = time + 31536000000, // 365 days + expireTime = time + timeExipre, // 365 days regex = new RegExp("!" + key + "=(wait|true|false)", "g"), cookie = tarteaucitron.cookie.read().replace(regex, ""), value = 'tarteaucitron=' + cookie + '!' + key + '=' + status, From b35fb330142989c43584b21ceb54bf15bac913bf Mon Sep 17 00:00:00 2001 From: eldk Date: Mon, 11 Jun 2018 14:01:46 +0200 Subject: [PATCH 007/124] allow tarteaucitronAlertSmall to be at top when orientation is set to top. On mobile, when Adsense Auto Ads is in use, and orientation to bottom, the small alert should be behind ads. This allow alert to be at top and unhide it. --- css/tarteaucitron.css | 12 ++++++++++-- tarteaucitron.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index d0f24c8..3b0951d 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -364,9 +364,17 @@ /*** * Small alert */ + +.tarteaucitronAlertSmallTop { + top: 0; +} + +.tarteaucitronAlertSmallBottom { + bottom: 0; +} + #tarteaucitronAlertSmall { background: #333; - bottom: 0; display: none; padding: 0; position: fixed; @@ -542,4 +550,4 @@ ins.ferank-publicite, ins.adsbygoogle { div.amazon_product { height:240px; width:120px; -} \ No newline at end of file +} diff --git a/tarteaucitron.js b/tarteaucitron.js index 0cada71..29347a7 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -296,7 +296,7 @@ var tarteaucitron = { } if (defaults.showAlertSmall === true) { - html += '
'; + html += '
'; html += '
'; html += ' ' + tarteaucitron.lang.alertSmall; html += '
'; From 87d590e4762fe0f39f02acc11b5757ccf916d3b9 Mon Sep 17 00:00:00 2001 From: eldk Date: Tue, 12 Jun 2018 01:52:31 +0200 Subject: [PATCH 008/124] add DNT DoNotTrack Support : When browser make request with DNT header set to yes or 1, set all services to false and service.fallback if needed. tarteaucitronAlertBig is not displayed/needed but tarteaucitronAlertSmall is. --- tarteaucitron.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index 0cada71..81b806c 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -405,6 +405,7 @@ var tarteaucitron = { isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false, isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false, isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false; + isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1") ? true : false; if (tarteaucitron.added[service.key] !== true) { tarteaucitron.added[service.key] = true; @@ -462,6 +463,13 @@ var tarteaucitron = { } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); + } else if (!isResponded && isDNTRequested) { + tarteaucitron.cookie.create(service.key, 'false'); + if (typeof service.fallback === 'function') { + service.fallback(); + } + tarteaucitron.state[service.key] = false; + tarteaucitron.userInterface.color(service.key, false); } else if (!isResponded) { tarteaucitron.cookie.create(service.key, 'wait'); if (typeof service.fallback === 'function') { From d20fe6798a9d405c295d46d6f7f03bb4e96dd92a Mon Sep 17 00:00:00 2001 From: eldk Date: Tue, 12 Jun 2018 16:09:35 +0200 Subject: [PATCH 009/124] =?UTF-8?q?add=20option=20to=20enable=20DoNotTrack?= =?UTF-8?q?Support=20support=20:=20default=20:=20false=20to=20enable=20add?= =?UTF-8?q?=20:=20"handleBrowserDNTRequest":=20true=20/*=20R=C3=A9pondre?= =?UTF-8?q?=20au=20DoNotTrack=20du=20navigateur*/=20to=20on=20page=20tarte?= =?UTF-8?q?aucitron.init=20script.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 81b806c..1fa353b 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -183,7 +183,8 @@ var tarteaucitron = { "orientation": "top", "removeCredit": false, "showAlertSmall": true, - "cookieslist": true + "cookieslist": true, + "handleBrowserDNTRequest": false }, params = tarteaucitron.parameters; @@ -196,6 +197,7 @@ var tarteaucitron = { tarteaucitron.orientation = defaults.orientation; tarteaucitron.hashtag = defaults.hashtag; tarteaucitron.highPrivacy = defaults.highPrivacy; + tarteaucitron.handleBrowserDNTRequest = defaults.handleBrowserDNTRequest; // Step 1: load css linkElement.rel = 'stylesheet'; @@ -463,7 +465,7 @@ var tarteaucitron = { } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); - } else if (!isResponded && isDNTRequested) { + } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) { tarteaucitron.cookie.create(service.key, 'false'); if (typeof service.fallback === 'function') { service.fallback(); From 9be7b802167c1fb35b8bc1c7e8f7a027faee37d1 Mon Sep 17 00:00:00 2001 From: eldk Date: Tue, 12 Jun 2018 16:35:02 +0200 Subject: [PATCH 010/124] add DoNotTrack (handleBrowserDNTRequest) option to doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index be5c5c2..bc0dbd1 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ tarteaucitron.init({ "showAlertSmall": true, /* afficher le petit bandeau en bas à droite ? */ "cookieslist": true, /* Afficher la liste des cookies installés ? */ "removeCredit": false, /* supprimer le lien vers la source ? */ + "handleBrowserDNTRequest": false, /* Répondre au DoNotTrack du navigateur ?*/ "cookieDomain": ".my-multisite-domaine.fr" /* Nom de domaine sur lequel sera posé le cookie - pour les multisites / sous-domaines - Facultatif */ }); From 2c755da28e4d71c40578c2b42eff4be7206cf06c Mon Sep 17 00:00:00 2001 From: encreinformatique Date: Thu, 14 Jun 2018 11:51:25 +0200 Subject: [PATCH 011/124] Fix couple of mispelling Line 9 and 29 have been modified to fix a mispelling. Thank you @johandenhollander --- lang/tarteaucitron.nl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js index f5f6fa7..dda9e78 100644 --- a/lang/tarteaucitron.nl.js +++ b/lang/tarteaucitron.nl.js @@ -6,7 +6,7 @@ tarteaucitron.lang = { "alertBigScroll": "Door te blijven scrollen,", "alertBigClick": "Als je doorgaat met het surfen op deze website,", - "alertBig": "staat je alle diensten van derden toe", + "alertBig": "sta je alle diensten van derden toe", "alertBigPrivacy": "Deze site maakt gebruik van cookies en geeft u controle over wat u wilt activeren", "alertSmall": "Beheer instellingen", @@ -26,7 +26,7 @@ tarteaucitron.lang = { "useNoCookie": "Deze service heeft geen cookies geïnstalleerd.", "more": "Lees meer", "source": "Bekijk de officiële website", - "credit": "Cookie manager mogelijk gemakt door tarteaucitron.js", + "credit": "Cookie manager mogelijk gemaakt door tarteaucitron.js", "fallback": "is uitgeschakeld.", From 43438682c74c40d911a38adacfcaed9534bc5ab8 Mon Sep 17 00:00:00 2001 From: Ozee31 Date: Fri, 15 Jun 2018 15:31:42 +0200 Subject: [PATCH 012/124] fix Uncaught TypeError: Cannot set property 'push' of undefined if tarteaucitron.job is undefined --- tarteaucitron.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 3d8e718..8b9b361 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -327,17 +327,20 @@ var tarteaucitron = { div.id = 'tarteaucitronRoot'; body.appendChild(div, body); div.innerHTML = html; - + if (tarteaucitron.job !== undefined) { tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job); for (index = 0; index < tarteaucitron.job.length; index += 1) { tarteaucitron.addService(tarteaucitron.job[index]); } + } else { + tarteaucitron.job = [] } tarteaucitron.isAjax = true; + tarteaucitron.job.push = function (id) { - + // ie <9 hack if (typeof tarteaucitron.job.indexOf === 'undefined') { tarteaucitron.job.indexOf = function (obj, start) { @@ -349,7 +352,7 @@ var tarteaucitron = { return -1; }; } - + if (tarteaucitron.job.indexOf(id) === -1) { Array.prototype.push.call(this, id); } From ec634a20374a914ce5a077685503f4febf1e527a Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 15 Jun 2018 16:15:34 +0200 Subject: [PATCH 013/124] Wrong var definition --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 4e296c1..7603843 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -409,7 +409,7 @@ var tarteaucitron = { isWaiting = (cookie.indexOf(service.key + '=wait') >= 0) ? true : false, isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false, isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false, - isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false; + isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false, isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1") ? true : false; if (tarteaucitron.added[service.key] !== true) { From 4721ede6fe4c9cf311955b08dd6186bcabb34667 Mon Sep 17 00:00:00 2001 From: Steffen Anders Date: Mon, 18 Jun 2018 12:50:23 +0200 Subject: [PATCH 014/124] Add support for "Ad Up Technology" services --- README.md | 3 + tarteaucitron.services.js | 193 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+) diff --git a/README.md b/README.md index a593e1e..75c6b96 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Bonus: ## Supported services * Advertising network + * Ad Up Technology (ads) + * Ad Up Technology (conversion) + * Ad Up Technology (retargeting) * Amazon * Clicmanager * Criteo diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 1fed07c..574e0d8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -106,6 +106,199 @@ tarteaucitron.services.addtoanyshare = { } }; +// aduptech ads +tarteaucitron.services.aduptech_ads = { + "key": "aduptech_ads", + "type": "ads", + "name": "Ad Up Technology (ads)", + "uri": "https://www.adup-tech.com/datenschutz", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + var IDENTIFIER = "aduptech_ads", + API_URL = "https://s.d.adup-tech.com/jsapi"; + + var elements = document.getElementsByClassName(IDENTIFIER); + if (!elements || elements.length === 0) { + return; + } + + tarteaucitron.fallback([IDENTIFIER], ""); + + tarteaucitron.addScript(API_URL, "", function() { + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + + if (!element.getAttribute("id")) { + element.setAttribute("id", IDENTIFIER + Math.random().toString(36).substr(2, 9)); + } + + window.uAd.embed(element.getAttribute("id"), { + placementKey: element.getAttribute("placementKey"), + responsive: Boolean(element.getAttribute("responsive")), + lazy: Boolean(element.getAttribute("lazy")), + adtest: Boolean(element.getAttribute("test")), + query: element.getAttribute("query") || "", + minCpc: element.getAttribute("minCpc") || "", + pageUrl: element.getAttribute("pageUrl") || "", + skip: element.getAttribute("skip") || "" + }); + } + }); + + }, + "fallback": function () { + "use strict"; + tarteaucitron.fallback(["aduptech_ads"], tarteaucitron.engage("aduptech_ads")); + } +}; + +// aduptech conversion +tarteaucitron.services.aduptech_conversion = { + "key": "aduptech_conversion", + "type": "ads", + "name": "Ad Up Technology (conversion)", + "uri": "https://www.adup-tech.com/datenschutz", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + var IDENTIFIER = "aduptech_conversion", + CONVERSION_PIXEL_BASE_URL = "https://d.adup-tech.com/campaign/conversion"; + + var elements = document.getElementsByClassName(IDENTIFIER); + if (!elements || elements.length === 0) { + return; + } + + tarteaucitron.fallback([IDENTIFIER], ""); + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + + if (!element.getAttribute("advertiserId") || !element.getAttribute("conversionCode")) { + continue; + } + + var url = CONVERSION_PIXEL_BASE_URL + + "/" + encodeURIComponent(element.getAttribute("advertiserId")) + + "?t=" + encodeURIComponent(element.getAttribute("conversionCode")); + + if (element.getAttribute("price")) { + url += "&price=" + encodeURIComponent(element.getAttribute("price")); + } + + if (element.getAttribute("quantity")) { + url += "&quantity=" + encodeURIComponent(element.getAttribute("quantity")); + } + + if (element.getAttribute("total")) { + url += "&total=" + encodeURIComponent(element.getAttribute("total")); + } + + if (element.getAttribute("orderId")) { + url += "&order_id=" + encodeURIComponent(element.getAttribute("orderId")); + } + + if (element.getAttribute("itemNumber")) { + url += "&item_number=" + encodeURIComponent(element.getAttribute("itemNumber")); + } + + if (element.getAttribute("description")) { + url += "&description=" + encodeURIComponent(element.getAttribute("description")); + } + + (new Image()).src = url; + } + } +}; + +// aduptech retargeting +tarteaucitron.services.aduptech_retargeting = { + "key": "aduptech_retargeting", + "type": "ads", + "name": "Ad Up Technology (retargeting)", + "uri": "https://www.adup-tech.com/datenschutz", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + var IDENTIFIER = "aduptech_retargeting", + API_URL = "https://s.d.adup-tech.com/services/retargeting.js"; + + var elements = document.getElementsByClassName(IDENTIFIER); + if (!elements || elements.length === 0) { + return; + } + + tarteaucitron.fallback([IDENTIFIER], ""); + + window.AdUpRetargeting = function(api) { + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + + api.init(); + + api.setAccount(element.getAttribute("account")); + + if (element.getAttribute("email")) { + api.setEmail(element.getAttribute("email")); + } else if (element.getAttribute("hashedEmail")) { + api.setHashedEmail(element.getAttribute("hashedEmail")); + } + + if (element.getAttribute("product")) { + try { + api.setProduct(JSON.parse(element.getAttribute("product"))); + } catch (e) { + api.setProduct(element.getAttribute("product")); + } + } + + if (element.getAttribute("transaction")) { + try { + api.setTransaction(JSON.parse(element.getAttribute("transaction"))); + } catch (e) { + api.setTransaction(element.getAttribute("transaction")); + } + } + + if (element.getAttribute("demarkUser")) { + api.setDemarkUser(); + } else if (element.getAttribute("demarkProducts")) { + api.setDemarkProducts(); + } + + if (element.getAttribute("conversionCode")) { + api.setConversionCode(element.getAttribute("conversionCode")); + } + + if (element.getAttribute("device")) { + var setter = "set" + element.getAttribute("device").charAt(0).toUpperCase() + element.getAttribute("device").slice(1); + if (typeof api[setter] === 'function') { + api[setter](); + } + } + + if (element.getAttribute("track")) { + var tracker = "track" + element.getAttribute("track").charAt(0).toUpperCase() + element.getAttribute("track").slice(1); + if (typeof api[tracker] === "function") { + api[tracker](); + } else { + api.trackHomepage(); + } + } + }; + }; + + tarteaucitron.addScript(API_URL); + } +}; + // alexa tarteaucitron.services.alexa = { "key": "alexa", From 741dd6be67bb6d6286303163d1b4dde6f2525112 Mon Sep 17 00:00:00 2001 From: lucmuller Date: Tue, 26 Jun 2018 10:32:31 +0200 Subject: [PATCH 015/124] Ajout d'un engagement pour Recaptcha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Afin de laisser la possibilité à l'utilisateur d'afficher recaptcha pour envoyer les formulaires --- tarteaucitron.services.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 12291f5..ba771ea 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1206,7 +1206,13 @@ tarteaucitron.services.recaptcha = { "cookies": ['nid'], "js": function () { "use strict"; + tarteaucitron.fallback(['g-recaptcha'], ''); tarteaucitron.addScript('https://www.google.com/recaptcha/api.js'); + }, + "fallback": function () { + "use strict"; + var id = 'recaptcha'; + tarteaucitron.fallback(['g-recaptcha'], tarteaucitron.engage(id)); } }; @@ -2159,4 +2165,3 @@ tarteaucitron.services.webmecanik = { }); } }; - From 489d37a5b24ba88df813b6a0d743f824fe500c0c Mon Sep 17 00:00:00 2001 From: lucmuller Date: Fri, 29 Jun 2018 11:56:03 +0200 Subject: [PATCH 016/124] 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 017/124] 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 018/124] 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 019/124] 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 020/124] 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 021/124] 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 022/124] 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 023/124] 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 024/124] =?UTF-8?q?=E2=9C=A8=20Add=20the=20ability=20to=20?= =?UTF-8?q?load=20Google=20Maps=20libraries=20(ie.=20geometry,=20places,?= =?UTF-8?q?=20visualization,=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 025/124] 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 026/124] 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 027/124] 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 028/124] 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 029/124] 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 030/124] 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 031/124] 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 032/124] 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 033/124] 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 034/124] 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 054/124] 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 055/124] 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 056/124] 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 057/124] 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 058/124] 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 059/124] 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 060/124] 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 061/124] 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 062/124] 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 063/124] 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 064/124] 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 065/124] 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 066/124] 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 067/124] 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 068/124] 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 069/124] 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 070/124] =?UTF-8?q?=F0=9F=90=9B=20Fix=20an=20incompatibili?= =?UTF-8?q?ty=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 071/124] 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 072/124] 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 += '