1(function() { 2 ////Functions for block Navigation 3 4 function blockNavigation() { 5 6 var el = document.querySelector('body'); 7 8 var newEl = document.createElement('div'); 9 10 newEl.setAttribute("id", "acceptationCMPWall"); 11 newEl.setAttribute("class", "blockNavigation"); 12 newEl.innerHTML = '<div class="blockNavigation"></div>'; 13 14 /* estilos de la capa */ 15 var el2 = document.querySelector('head'); 16 var newEl2 = document.createElement('style'); 17 18 /* parte configurable nombre de la capa */ 19 newEl2.innerHTML = '.blockNavigation{ top: 0; left: 0; right: 0; bottom: 0; z-index: 5000; position: fixed; background-color: rgba(0, 0, 0, 0.3); }'; 20 21 el.appendChild(newEl); 22 el2.appendChild(newEl2); 23 24 /* estilo para bloqueo de scroll*/ 25 document.body.style.overflow = 'hidden'; 26 27 28 } 29 30 function unblockNavigation() { 31 32 var blockDiv = document.getElementById("acceptationCMPWall"); 33 if (blockDiv != null) { 34 blockDiv.style.display = "none"; 35 } 36 document.body.style.overflow = ''; 37 } 38 39 /// 40 41 /// 42 43 44 function initDidomi() { 45 46 47 window.CMP = {}; 48 49 50 function a(e) { 51 if (!window.frames[e]) { 52 if (document.body && document.body.firstChild) { 53 var t = document.body; 54 var n = document.createElement("iframe"); 55 n.style.display = "none"; 56 n.name = e; 57 n.title = e; 58 t.insertBefore(n, t.firstChild) 59 } else { setTimeout(function() { a(e) }, 5) } 60 } 61 } 62 63 function e(n, r, o, c, s) { 64 function e(e, t, n, a) { if (typeof n !== "function") { return } if (!window[r]) { window[r] = [] } var i = false; if (s) { i = s(e, t, n) } if (!i) { window[r].push({ command: e, parameter: t, callback: n, version: a }) } } 65 e.stub = true; 66 67 function t(a) { 68 if (!window[n] || window[n].stub !== true) { return } 69 if (!a.data) { return } 70 var i = typeof a.data === "string"; 71 var e; 72 try { e = i ? JSON.parse(a.data) : a.data } catch (t) { return } 73 if (e[o]) { 74 var r = e[o]; 75 window[n](r.command, r.parameter, function(e, t) { 76 var n = {}; 77 n[c] = { returnValue: e, success: t, callId: r.callId }; 78 a.source.postMessage(i ? JSON.stringify(n) : n, "*") 79 }, r.version) 80 } 81 } 82 if (typeof window[n] !== "function") { window[n] = e; if (window.addEventListener) { window.addEventListener("message", t, false) } else { window.attachEvent("onmessage", t) } } 83 } 84 e("__tcfapi", "__tcfapiBuffer", "__tcfapiCall", "__tcfapiReturn"); 85 a("__tcfapiLocator"); 86 (function(e) { 87 var t = document.createElement("script"); 88 t.id = "spcloader"; 89 t.type = "text/javascript"; 90 t.async = true; 91 t.src = "https://sdk.privacy-center.org/" + e + "/loader.js?target=" + document.location.hostname; 92 t.charset = "utf-8"; 93 var n = document.getElementsByTagName("script")[0]; 94 n.parentNode.insertBefore(t, n) 95 })("ab6b9723-5903-48b0-816e-6b9880072fae"); 96 97 window.didomiEventListeners = window.didomiEventListeners || []; 98 window.didomiEventListeners.push({ 99 event: 'preferences.clicksavechoices', 100 listener: function() { 101 unblockNavigation(); 102 } 103 }); 104 105 window.didomiEventListeners.push({ 106 event: 'notice.clickagree', 107 listener: function() { 108 // The user has clicked on the Close button 109 unblockNavigation(); 110 } 111 }); 112 113 window.didomiEventListeners = window.didomiEventListeners || []; 114 window.didomiEventListeners.push({ 115 event: 'notice.clickdisagree', 116 listener: function() { 117 // The user has clicked on the "Decline" button 118 unblockNavigation(); 119 } 120 }); 121 122 window.didomiEventListeners = window.didomiEventListeners || []; 123 window.didomiEventListeners.push({ 124 event: 'preferences.clickdisagreetoall', 125 listener: function() { 126 // The user has clicked on the "Disagree to all" button 127 unblockNavigation(); 128 } 129 }); 130 131 window.didomiEventListeners = window.didomiEventListeners || []; 132 window.didomiEventListeners.push({ 133 event: 'preferences.clickagreetoall', 134 listener: function() { 135 // The user has clicked on the "Agree to all" button 136 unblockNavigation(); 137 } 138 }); 139 140 } 141 142 143 function navigationBlock() { 144 window.didomiOnReady = window.didomiOnReady || []; 145 window.didomiOnReady.push(function() { 146 147 if (Didomi.shouldConsentBeCollected()) { 148 blockNavigation(); 149 } 150 151 }); 152 153 } 154 155 function isCookiesPolicyPage() { 156 let pageLocation = document.location.href; 157 let foundedSite = pageLocation.match(/cookie/g); 158 if (foundedSite != null) { 159 return true; 160 } else { 161 return false; 162 } 163 } 164 165 function startCMP() { 166 initDidomi(); 167 if (!isCookiesPolicyPage()) { 168 navigationBlock(); 169 } else { 170 window.didomiOnReady = window.didomiOnReady || []; 171 172 window.didomiOnReady.push(function(Didomi) { 173 Didomi.notice.hide(); 174 }); 175 176 } 177 } 178
179 startCMP(); 180 181 182})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.