From 8d86ad84e48c06626f4c0abcfb8f34ad81278ed0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Thu, 31 Oct 2019 08:25:35 +0100 Subject: [PATCH] High privacy by default and new middle bar --- README.md | 4 ++-- lang/tarteaucitron.bg.js | 1 + lang/tarteaucitron.cs.js | 1 + lang/tarteaucitron.de.js | 1 + lang/tarteaucitron.el.js | 1 + lang/tarteaucitron.en.js | 1 + lang/tarteaucitron.es.js | 1 + lang/tarteaucitron.fr.js | 2 ++ lang/tarteaucitron.it.js | 1 + lang/tarteaucitron.nl.js | 1 + lang/tarteaucitron.pl.js | 1 + lang/tarteaucitron.pt.js | 1 + lang/tarteaucitron.ro.js | 1 + lang/tarteaucitron.ru.js | 1 + tarteaucitron.js | 23 +++++++++++++++++++---- 15 files changed, 35 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0d50b149..c5da4376 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ tarteaucitron.init({ "hashtag": "#tarteaucitron", /* Open the panel with this hashtag */ "cookieName": "tarteaucitron", /* Cookie name */ - "orientation": "top", /* Banner position (top - bottom) */ + "orientation": "middle", /* Banner position (top - bottom) */ "showAlertSmall": true, /* Show the small banner on bottom right */ "cookieslist": true, /* Show the cookie list */ "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 */ + "highPrivacy": true, /* Disable auto consent */ "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */ "removeCredit": false, /* Remove credit link */ diff --git a/lang/tarteaucitron.bg.js b/lang/tarteaucitron.bg.js index 8476923f..111664a2 100644 --- a/lang/tarteaucitron.bg.js +++ b/lang/tarteaucitron.bg.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Здравей! Този сайт позволяа включването на бисквитки по избор.", "adblock_call": "Моля изключете вашият adblocker и изберете бисквитките които искате, или спрете всички.", "reload": "Презареди", diff --git a/lang/tarteaucitron.cs.js b/lang/tarteaucitron.cs.js index 11202544..429f8418 100644 --- a/lang/tarteaucitron.cs.js +++ b/lang/tarteaucitron.cs.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Ahoj! Tato stránka je transparetní a umožňuje ti si přímo vybrat, jaké služby třetích stran chceš povolit.", "adblock_call": "Pro úpravu osobních preferencí si, prosím, vypni adblock.", "reload": "Načíst stránku znovu", diff --git a/lang/tarteaucitron.de.js b/lang/tarteaucitron.de.js index 649a2440..3ae1414f 100644 --- a/lang/tarteaucitron.de.js +++ b/lang/tarteaucitron.de.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Hallo! Diese Seite ist transparent und lässt Ihnen die Wahl der externen Services, die aktiviert werden dürfen.", "adblock_call": "Bitte deaktivieren Sie Ihren 'Werbeblocker' um Cookie-Einstellungen vornehmen zu können.", "reload": "Seite neu laden", diff --git a/lang/tarteaucitron.el.js b/lang/tarteaucitron.el.js index 30b2b41a..9d9a2850 100644 --- a/lang/tarteaucitron.el.js +++ b/lang/tarteaucitron.el.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Γεια σας! Ο ιστότοπος αυτός σας επιτρέπει να επιλέξετε τις υπηρεσίες που παρέχονται από τρίτους που θα θέλατε να επιτρέψετε.", "adblock_call": "Παρακαλώ απενεργοποιήστε τα προγράμματα απόρριψης διαφημίσεων για να ξεκινήσετε τις τροποποιήσεις σας.", "reload": "Ανανέωση της σελίδας", diff --git a/lang/tarteaucitron.en.js b/lang/tarteaucitron.en.js index a4aa7f88..452a6524 100644 --- a/lang/tarteaucitron.en.js +++ b/lang/tarteaucitron.en.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Hello! This site is transparent and lets you chose the 3rd party services you want to allow.", "adblock_call": "Please disable your adblocker to start customizing.", "reload": "Refresh the page", diff --git a/lang/tarteaucitron.es.js b/lang/tarteaucitron.es.js index f59000ba..51c2694f 100644 --- a/lang/tarteaucitron.es.js +++ b/lang/tarteaucitron.es.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "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", diff --git a/lang/tarteaucitron.fr.js b/lang/tarteaucitron.fr.js index 7611ebde..de051597 100644 --- a/lang/tarteaucitron.fr.js +++ b/lang/tarteaucitron.fr.js @@ -1,5 +1,7 @@ /*global tarteaucitron */ tarteaucitron.lang = { + + "middleBarHead": "☝ 🍪", "adblock": "Bonjour! Ce site joue la transparence et vous donne le choix des services tiers à activer.", "adblock_call": "Merci de désactiver votre adblocker pour commencer la personnalisation.", "reload": "Recharger la page", diff --git a/lang/tarteaucitron.it.js b/lang/tarteaucitron.it.js index e3698600..7b473311 100644 --- a/lang/tarteaucitron.it.js +++ b/lang/tarteaucitron.it.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Benvenuto! Questo sito ti permette di attivare i servizi di terzi di tua scelta.", "adblock_call": "Disabilita il tuo adblocker per iniziare la navigazione.", "reload": "Aggiorna la pagina", diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js index ad8e2014..e5a98fe1 100644 --- a/lang/tarteaucitron.nl.js +++ b/lang/tarteaucitron.nl.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "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", diff --git a/lang/tarteaucitron.pl.js b/lang/tarteaucitron.pl.js index 55f2681b..4d55cd1b 100644 --- a/lang/tarteaucitron.pl.js +++ b/lang/tarteaucitron.pl.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Witaj! Ta witryna oferuje daje mozliwość wyboru aktywacji usług zewnętrznych.", "adblock_call": "Prosze wylaczyc adblocker aby rozpoczac dostosowanie do potrzeb uzytkownika.", "reload": "Odswież stronę", diff --git a/lang/tarteaucitron.pt.js b/lang/tarteaucitron.pt.js index 6c564e34..111a3643 100644 --- a/lang/tarteaucitron.pt.js +++ b/lang/tarteaucitron.pt.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Olá! Em uma açao de transparencia, este site lhe dá a opção de quais serviços terceiros deseje ativar.", "adblock_call": "Por favor, desative seu bloqueador de publicidades para poder customizar.", "reload": "Atualizar esta página", diff --git a/lang/tarteaucitron.ro.js b/lang/tarteaucitron.ro.js index 6c20fd3f..5611dfea 100644 --- a/lang/tarteaucitron.ro.js +++ b/lang/tarteaucitron.ro.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Buna! Acest site este transparent și vă permite să alegeți serviciile terță parte pe care doriți să le permiteți.", "adblock_call": "Dezactivați-vă adblocker-ul pentru a începe personalizarea.", "reload": "Reincarca Pagina", diff --git a/lang/tarteaucitron.ru.js b/lang/tarteaucitron.ru.js index 7be324d4..5c7dd94a 100644 --- a/lang/tarteaucitron.ru.js +++ b/lang/tarteaucitron.ru.js @@ -1,5 +1,6 @@ /*global tarteaucitron */ tarteaucitron.lang = { + "middleBarHead": "☝ 🍪", "adblock": "Привет! Этот сайт совершенно открытый и позволяет вам выбрать сервисы третьих лиц, которым вы хотите дать доступ.", "adblock_call": "Пожалуйста дезактивируйте АдБлокер чтобы начать настройку.", "reload": "Перезагрузите страницу", diff --git a/tarteaucitron.js b/tarteaucitron.js index 035d4d98..605f12ec 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -18,7 +18,7 @@ var scripts = document.getElementsByTagName('script'), var tarteaucitron = { - "version": 20191029, + "version": 20191031, "cdn": cdn, "user": {}, "lang": {}, @@ -212,13 +212,13 @@ var tarteaucitron = { "adblocker": false, "hashtag": '#tarteaucitron', "cookieName": 'tarteaucitron', - "highPrivacy": false, - "orientation": "top", + "highPrivacy": true, + "orientation": "middle", "removeCredit": false, "showAlertSmall": true, "cookieslist": true, "handleBrowserDNTRequest": false, - "AcceptAllCta" : false, + "AcceptAllCta" : true, "moreInfoLink": true, "privacyUrl": "", "useExternalCss": false @@ -261,6 +261,21 @@ var tarteaucitron = { } tarteaucitron.addScript(pathToServices, '', function () { + + // css for new middle bar + if (tarteaucitron.orientation === 'middle') { + var customThemeMiddle = document.createElement('style'), + cssRuleMiddle = 'div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 50px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {width: 60%;min-width: 285px;height: auto;margin: auto;left: 50%;top: 50%;transform: translate(-50%, -50%);box-shadow: 0 0 9000px #000;border-radius: 20px;padding: 50px 0;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 50px 0;display: block;text-align: center;font-size: 21px;}'; + + customThemeMiddle.type = 'text/css'; + if (customThemeMiddle.styleSheet) { + customThemeMiddle.styleSheet.cssText = cssRuleMiddle; + } else { + customThemeMiddle.appendChild(document.createTextNode(cssRuleMiddle)); + } + document.getElementsByTagName('head')[0].appendChild(customThemeMiddle); + } + var body = document.body, div = document.createElement('div'), html = '',