Browse Source

Add option for the Deny All button

Sylry 4 years ago
parent
commit
7748943827
2 changed files with 3 additions and 1 deletions
  1. 1 0
      README.md
  2. 2 1
      tarteaucitron.js

+ 1 - 0
README.md

@@ -41,6 +41,7 @@ tarteaucitron.init({
     "cookieslist": true, /* Show the cookie list */
 
     "adblocker": false, /* Show a Warning if an adblocker is detected */
+    "DenyAllCta" : true, /* Show the deny all button */
     "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
     "highPrivacy": true, /* Disable auto consent */
     "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */

+ 2 - 1
tarteaucitron.js

@@ -210,6 +210,7 @@ var tarteaucitron = {
                 "showAlertSmall": true,
                 "cookieslist": true,
                 "handleBrowserDNTRequest": false,
+                "DenyAllCta": true,
                 "AcceptAllCta" : true,
                 "moreInfoLink": true,
                 "privacyUrl": "",
@@ -406,7 +407,7 @@ var tarteaucitron = {
                     html += '   </button>';
 
 
-                    if (tarteaucitron.parameters.orientation === 'middle') {
+                    if (tarteaucitron.parameters.DenyAllCta) {
                                     html += '   <button type="button" class="tarteaucitronCTAButton tarteaucitronDeny"  onclick="tarteaucitron.userInterface.respondAll(false);">';
                                     html += '       &#10007; ' + tarteaucitron.lang.denyAll;
                                     html += '   </button>';