From 1a4967acae4ef0ccba74d695b69acdfa9c0d2f3f Mon Sep 17 00:00:00 2001 From: Romain Baudot Date: Fri, 6 Jul 2018 11:29:24 +0200 Subject: [PATCH 01/72] 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 b1cae8da4f50ce77fcfcd8853a65b05319873be9 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Fri, 27 Jul 2018 10:55:14 +0200 Subject: [PATCH 02/72] 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 03/72] 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 04/72] 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 05/72] 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 06/72] 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 07/72] 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 26/72] 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 27/72] 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 28/72] 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 29/72] 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 30/72] 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 31/72] 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 32/72] 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 33/72] 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 34/72] 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 35/72] 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 36/72] 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 37/72] 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 38/72] 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 39/72] 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 40/72] 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 41/72] 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 42/72] =?UTF-8?q?=F0=9F=90=9B=20Fix=20an=20incompatibility?= =?UTF-8?q?=20with=20prototype.js=20<=201.7.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index f5503ad..bfe8cae 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -385,7 +385,7 @@ var tarteaucitron = { // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; - + while (document.body.firstChild) { wrapper.appendChild(document.body.firstChild); @@ -456,7 +456,7 @@ var tarteaucitron = { // create wrapper container var wrapper = document.createElement('div'); wrapper.id = "contentWrapper"; - + while (document.body.firstChild) { wrapper.appendChild(document.body.firstChild); @@ -761,7 +761,7 @@ var tarteaucitron = { } document.getElementById('contentWrapper').setAttribute("aria-hidden", "false"); document.getElementsByTagName('body')[0].classList.remove('modal-open'); - + }, "focusTrap": function() { "use strict"; @@ -779,23 +779,23 @@ var tarteaucitron = { if (focusableEls[i].offsetHeight > 0) { filtered.push(focusableEls[i]); } - } + } - firstFocusableEl = filtered[0]; + firstFocusableEl = filtered[0]; lastFocusableEl = filtered[filtered.length - 1]; //loop focus inside tarteaucitron document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) { - + if ( evt.key === 'Tab' || evt.keyCode === 9 ) { - + if ( evt.shiftKey ) /* shift + tab */ { if (document.activeElement === firstFocusableEl) { lastFocusableEl.focus(); evt.preventDefault(); } } else /* tab */ { - if (document.activeElement === lastFocusableEl) { + if (document.activeElement === lastFocusableEl) { firstFocusableEl.focus(); evt.preventDefault(); } @@ -877,7 +877,8 @@ var tarteaucitron = { allDivs = main.childNodes; if (typeof Array.prototype.map === 'function') { - Array.prototype.map.call(main.children, Object).sort(function (a, b) { + var mainChildren = Array.from(main.children); + mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } return 0; From 6bd6555554966d5d2f06328131edd1843e9d831b Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:40:16 +0200 Subject: [PATCH 43/72] 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 44/72] Better scroll management --- tarteaucitron.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index f5503ad..1af4756 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180910, + "version": 20180911002, "cdn": cdn, "user": {}, "lang": {}, @@ -289,7 +289,7 @@ var tarteaucitron = { html += ' '; html += ' '; html += ' '; - html += '
    '; + html += '
    '; html += '
      '; for (i = 0; i < cat.length; i += 1) { html += '
    • '; @@ -932,20 +932,20 @@ var tarteaucitron = { if (document.getElementById('tarteaucitron') !== null && document.getElementById('tarteaucitronClosePanel') !== null && document.getElementById('tarteaucitronMainLineOffset') !== null) { // reset - tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', 'auto'); + tarteaucitron.userInterface.css('tarteaucitronServices', 'height', 'auto'); // calculate mainHeight = document.getElementById('tarteaucitron').offsetHeight; closeButtonHeight = document.getElementById('tarteaucitronClosePanel').offsetHeight; - headerHeight = document.getElementById('tarteaucitronMainLineOffset').offsetHeight; // apply - servicesHeight = (mainHeight - closeButtonHeight - headerHeight + 1); - tarteaucitron.userInterface.css('tarteaucitronScrollbarParent', 'height', servicesHeight + 'px'); + servicesHeight = (mainHeight - closeButtonHeight + 2); + tarteaucitron.userInterface.css('tarteaucitronServices', 'height', servicesHeight + 'px'); + tarteaucitron.userInterface.css('tarteaucitronServices', 'overflow-x', 'auto'); } // align the main allow/deny button depending on scrollbar width - if (document.getElementById('tarteaucitronScrollbarParent') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) { + if (document.getElementById('tarteaucitronServices') !== null && document.getElementById('tarteaucitronScrollbarChild') !== null) { // media query if (e[a + 'Width'] <= 479) { @@ -954,7 +954,7 @@ var tarteaucitron = { scrollbarMarginRight = 12; } - scrollbarWidthParent = document.getElementById('tarteaucitronScrollbarParent').offsetWidth; + scrollbarWidthParent = document.getElementById('tarteaucitronServices').offsetWidth; scrollbarWidthChild = document.getElementById('tarteaucitronScrollbarChild').offsetWidth; tarteaucitron.userInterface.css('tarteaucitronScrollbarAdjust', 'marginRight', ((scrollbarWidthParent - scrollbarWidthChild) + scrollbarMarginRight) + 'px'); } From 63f0ba6866e16cbba1f1ffdb60c686464603c6ca Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:52:18 +0200 Subject: [PATCH 45/72] Restore effect on general allow/deny buttons --- tarteaucitron.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 1af4756..ec2420c 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -696,13 +696,15 @@ var tarteaucitron = { if (nbDenied === 0 && nbPending === 0) { tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark); - tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray); + tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '0.4'); + tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1'); } else if (nbAllowed === 0 && nbPending === 0) { - tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray); + tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '0.4'); + tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1'); tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark); } else { - tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray); - tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray); + tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1'); + tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1'); } // close the alert if all service have been reviewed @@ -877,7 +879,9 @@ var tarteaucitron = { allDivs = main.childNodes; if (typeof Array.prototype.map === 'function') { - Array.prototype.map.call(main.children, Object).sort(function (a, b) { + //Array.prototype.map.call(main.children, Object).sort(function (a, b) { + var mainChildren = Array.from(main.children); + mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } return 0; From 98392f2f40b6d1324193e4a6111ceb6afb3b8a5a Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 10:56:34 +0200 Subject: [PATCH 46/72] Fix title margin --- css/tarteaucitron.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 8e68326..2b28457 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -210,7 +210,7 @@ div#tarteaucitronServices { #tarteaucitronRoot h2 { display: inline-block; - margin-left: 5px; + margin: 12px 0 0 10px; color: #fff; } From 7aab572bf4b698a26f4b4acf3d1fb734b47e1be0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 11:10:28 +0200 Subject: [PATCH 47/72] Add box shadow to the main panel --- css/tarteaucitron.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 2b28457..68ce9d9 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -66,6 +66,10 @@ div#tarteaucitronServices { outline: 0px solid slategrey; } +div#tarteaucitronServices { + box-shadow: 0 0 35px #575757; +} + /*** * Responsive layout for the control panel */ From 7bccde22c622952f8d3f82daa7e84f89b80b73c0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 11 Sep 2018 13:58:17 +0200 Subject: [PATCH 48/72] Revert #208 Do not work on IE11 --- tarteaucitron.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index d2dcf29..bb9e364 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -880,8 +880,9 @@ var tarteaucitron = { if (typeof Array.prototype.map === 'function') { - var mainChildren = Array.from(main.children); - mainChildren.sort(function (a, b) { + Array.prototype.map.call(main.children, Object).sort(function (a, b) { + //var mainChildren = Array.from(main.children); + //mainChildren.sort(function (a, b) { if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } From aa4266896da950a15ab23b7ead9f1205e43bf5e7 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 12 Sep 2018 11:15:01 +0200 Subject: [PATCH 49/72] Improved Spanish translation --- lang/tarteaucitron.es.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lang/tarteaucitron.es.js b/lang/tarteaucitron.es.js index 7b2232a..402b0b5 100644 --- a/lang/tarteaucitron.es.js +++ b/lang/tarteaucitron.es.js @@ -1,14 +1,14 @@ /*global tarteaucitron */ tarteaucitron.lang = { - "adblock": "Hola! Este sitio web es transparente y le da la opción de activar los servicios de terceros.", - "adblock_call": "Por favor deshabilite su AdBlocker para empezar a personalizar los servicios.", + "adblock": "¡Hola! Este sitio web es transparente y te da la opción de activar los servicios de terceros.", + "adblock_call": "Por favor deshabilita tu AdBlocker para empezar a personalizar los servicios.", "reload": "Actualizar esta página", - "alertBigScroll": "Al continuar para desplazarse,", + "alertBigScroll": "Al continuar desplazándote,", "alertBigClick": "Si continuas navegando por este sitio web,", - "alertBig": "estar permitiendo servicios terceros", + "alertBig": "estás permitiendo servicios terceros", - "alertBigPrivacy": "Este sitio web usa cookies y te permite controlar lo que deseas activar", + "alertBigPrivacy": "Este sitio web usa cookies y te permite controlar las que deseas activar", "alertSmall": "Gestionar servicios", "personalize": "Personalizar", "acceptAll": "OK, aceptar todas", @@ -19,10 +19,10 @@ tarteaucitron.lang = { "all": "Ajustes para todos los servicios", "info": "Protegiendo tu privacidad", - "disclaimer": "Aceptando estos servicios terceros, estas aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.", + "disclaimer": "Aceptando estos servicios de terceros, estás aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.", "allow": "Permitir", "deny": "Denegar", - "noCookie": "Este servicio no usa cookie.", + "noCookie": "Este servicio no usa cookies.", "useCookie": "Este servicio puede instalar", "useCookieCurrent": "Este servicio ha instalado", "useNoCookie": "Este servicio no ha instalado ninguna cookie.", @@ -30,13 +30,13 @@ tarteaucitron.lang = { "source": "Ver sitio web oficial", "credit": "Gestor de cookies realizada por tarteaucitron.js", - "toggleInfoBox": "Show/hide informations about cookie storage", - "title": "Cookies management panel", - "cookieDetail": "Cookie detail for", - "ourSite": "on our site", - "newWindow": "(new window)", - "allowAll": "Allow all cookies", - "denyAll": "Deny all cookies", + "toggleInfoBox": "Mostrar/ocultar información sobre almacenamiento de cookies", + "title": "Panel de gestión de cookies", + "cookieDetail": "Detalles de las cookies para", + "ourSite": "en nuestra web", + "newWindow": "(ventana nueva)", + "allowAll": "Permitir todas las cookies", + "denyAll": "Denegar todas las cookies", "fallback": "está deshabilitado.", @@ -45,8 +45,8 @@ tarteaucitron.lang = { "details": "Las redes publicitarias pueden generar ingresos mediante la venta de espacios publicitarios en el sitio." }, "analytic": { - "title": "Mediciión de audiencia", - "details": "Los servicios de medición de audiencia se usan para generar asistencia estadísticas útiles para mejorar el sitio." + "title": "Medición de audiencia", + "details": "Los servicios de medición de audiencia se usan para generar estadísticas útiles para mejorar el sitio." }, "social": { "title": "Redes sociales", From ba8bb5cdbf37c9c4430108545e648625c310d806 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 12 Sep 2018 12:57:21 +0200 Subject: [PATCH 50/72] Added matterport service --- tarteaucitron.services.js | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index f5096b2..230ef20 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -2326,3 +2326,63 @@ tarteaucitron.services.bingads = { } }; +//Matterport +/* +SERVICE INIT + (tarteaucitron.job = tarteaucitron.job || []).push('matterport'); + +HTML TAG +
      + +DELETE IFRAME + ' + */ +tarteaucitron.services.matterport = { + "key": "matterport", + "type": "other", + "name": "Matterport", + "uri": "https://matterport.com/es/legal/privacy-policy/", + "needConsent": true, + "cookies": ['__cfduid', 'ajs_anonymous_id', 'ajs_group_id', 'ajs_user_id'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['matterport'], function (x) { + var matterport_id = x.getAttribute("matterportID"), + matterport_width = x.getAttribute("width"), + frame_width = 'width=', + matterport_height = x.getAttribute("height"), + frame_height = 'height=', + matterport_parameters = x.getAttribute("parameters"), + matterport_frame; + + if (matterport_id === undefined) { + return ""; + } + if (matterport_width !== undefined) { + frame_width += '"' + matterport_width + '" '; + } else { + frame_width += '"" '; + } + if (matterport_height !== undefined) { + frame_height += '"' + matterport_height + '" '; + } else { + frame_height += '"" '; + } + if (matterport_parameters === undefined) { + return ""; + } + + matterport_frame = ''; + return matterport_frame; + }); + }, + "fallback": function () { + "use strict"; + var id = 'matterport'; + tarteaucitron.fallback(['matterport'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; \ No newline at end of file From b0d1b52e22f7e9a110a1bad019ed7011389bf3a6 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 12 Sep 2018 17:46:29 +0200 Subject: [PATCH 51/72] Add cursor:pointer on privacy link --- css/tarteaucitron.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index 68ce9d9..a2e187a 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -480,6 +480,10 @@ h2#tarteaucitronCookiesNumberBis { font-weight: 700; } +#tarteaucitronAlertBig #tarteaucitronPrivacyUrl { + cursor: pointer; +} + #tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitron #tarteaucitronPrivacyUrl { background: #008300; color: #fff; From a5bf32ea728a8212ced4ba1a1ab7e831b2f463a7 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 14 Sep 2018 09:28:09 +0200 Subject: [PATCH 52/72] Better default button color --- css/tarteaucitron.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index a2e187a..854c637 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -705,9 +705,16 @@ div.amazon_product { width:120px; } .tarteaucitronIsAllowed .tarteaucitronDeny { - opacity: 0.5; + opacity: 0.4!important; }.tarteaucitronIsDenied .tarteaucitronAllow { - opacity: 0.5; + opacity: 0.4!important; +}.tarteaucitronIsAllowed .tarteaucitronAllow { + opacity: 1!important; +}.tarteaucitronIsDenied .tarteaucitronDeny { + opacity: 1!important; +} +.tarteaucitronLine .tarteaucitronAllow, .tarteaucitronLine .tarteaucitronAllow { + opacity: 0.4; } div#tarteaucitronInfo { From 096065c0bb842a105f374062afa0652190fd9ac9 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 14 Sep 2018 09:30:29 +0200 Subject: [PATCH 53/72] Fix colors of button #213 --- tarteaucitron.js | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index bb9e364..8108076 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20180911002, + "version": 20180914, "cdn": cdn, "user": {}, "lang": {}, @@ -333,7 +333,13 @@ var tarteaucitron = { } else { html += '
      '; html += ' '; - html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; + + if (tarteaucitron.parameters.highPrivacy) { + html += ' ' + tarteaucitron.lang.alertBigPrivacy; + } else { + html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig; + } + html += ' '; html += ' '; From f6f147ce36c58e02d0a30e2e15eeb16281050597 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Thu, 4 Oct 2018 07:29:15 +0200 Subject: [PATCH 72/72] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ace3f6d..4a91692 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ tarteaucitron.init({ "adblocker": false, /* Show a Warning if an adblocker is detected */ "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */ "highPrivacy": false, /* Disable auto consent */ - "handleBrowserDNTRequest": false, /* If Do Not Track == 1, accept all */ + "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */ "removeCredit": false, /* Remove credit link */ "moreInfoLink": true, /* Show more info link */