Skip to content

Commit

Permalink
High privacy by default and new middle bar
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauriC committed Oct 31, 2019
1 parent 9dfba82 commit 8d86ad8
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.bg.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*global tarteaucitron */
tarteaucitron.lang = {
"middleBarHead": "☝ 🍪",
"adblock": "Здравей! Този сайт позволяа включването на бисквитки по избор.",
"adblock_call": "Моля изключете вашият adblocker и изберете бисквитките които искате, или спрете всички.",
"reload": "Презареди",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.cs.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.de.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.el.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*global tarteaucitron */
tarteaucitron.lang = {
"middleBarHead": "☝ 🍪",
"adblock": "Γεια σας! Ο ιστότοπος αυτός σας επιτρέπει να επιλέξετε τις υπηρεσίες που παρέχονται από τρίτους που θα θέλατε να επιτρέψετε.",
"adblock_call": "Παρακαλώ απενεργοποιήστε τα προγράμματα απόρριψης διαφημίσεων για να ξεκινήσετε τις τροποποιήσεις σας.",
"reload": "Ανανέωση της σελίδας",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.en.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.es.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions lang/tarteaucitron.fr.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.it.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.nl.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.pl.js
Original file line number Diff line number Diff line change
@@ -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ę",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.pt.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.ro.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions lang/tarteaucitron.ru.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*global tarteaucitron */
tarteaucitron.lang = {
"middleBarHead": "☝ 🍪",
"adblock": "Привет! Этот сайт совершенно открытый и позволяет вам выбрать сервисы третьих лиц, которым вы хотите дать доступ.",
"adblock_call": "Пожалуйста дезактивируйте АдБлокер чтобы начать настройку.",
"reload": "Перезагрузите страницу",
Expand Down
23 changes: 19 additions & 4 deletions tarteaucitron.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var scripts = document.getElementsByTagName('script'),


var tarteaucitron = {
"version": 20191029,
"version": 20191031,
"cdn": cdn,
"user": {},
"lang": {},
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = '',
Expand Down

0 comments on commit 8d86ad8

Please sign in to comment.