Browse Source

Merge branch 'master' of https://github.com/lucmuller/tarteaucitron.js

Luc MULLER 4 years ago
parent
commit
0976ec5a23
1 changed files with 9 additions and 9 deletions
  1. 9 9
      tarteaucitron.js

+ 9 - 9
tarteaucitron.js

@@ -391,7 +391,7 @@ var tarteaucitron = {
                 }
 
                 if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
-                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
+                    html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
                     //html += '<div class="tarteaucitronAlertBigWrapper">';
                     html += '   <span id="tarteaucitronDisclaimerAlert">';
                     html += '       ' + tarteaucitron.lang.alertBigPrivacy;
@@ -411,7 +411,7 @@ var tarteaucitron = {
                     //html += '</div>';
                     html += '</div>';
                 } else {
-                    html += '<div tabindex="-1" id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
+                    html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
                     //html += '<div class="tarteaucitronAlertBigWrapper">';
                     html += '   <span id="tarteaucitronDisclaimerAlert">';
 
@@ -595,11 +595,11 @@ var tarteaucitron = {
                     }, 1500);
                 }
                 if(tarteaucitron.parameters.closePopup === true){
-                    var closeElement = document.getElementById('tarteaucitronAlertBig'),
-                        closeSpan = document.createElement('span');
-                    closeSpan.textContent = 'X';
-                    closeSpan.setAttribute('id', "tarteaucitronCloseCross");
-                    closeElement.insertBefore(closeSpan, closeElement.firstElementChild);
+                    let element = document.getElementById('tarteaucitronAlertBig');
+                    let span = document.createElement('span')
+                    span.textContent = 'X';
+                    span.setAttribute('id', "tarteaucitronCloseCross")
+                    element.insertBefore(span, element.firstElementChild)
                 }
 
 
@@ -1247,8 +1247,8 @@ var tarteaucitron = {
             }
             //end ie compatibility
 
-            if (document.getElementById('tarteaucitronAlertBig') !== null) {
-                document.getElementById('tarteaucitronAlertBig').focus();
+            if (document.getElementById('tarteaucitronPersonalize2') !== null) {
+                document.getElementById('tarteaucitronPersonalize2').focus();
             }
 
             window.dispatchEvent(tacOpenAlertEvent);