1 //<script type="text/javascript"> 2 if (typeof(iandu_cookieconsent_obj) == "undefined"){ 3 var iandu_cookieconsent_obj = { 4 "ajaxUrl" : "https://www.chiesamodenanonantola.it/wp-admin/admin-ajax.php", 5 "security" : "96b294942d", 6 "autorun" : true, 7 }; 8 } 9 var blocks = iandu_define_block(); 10 var cc = initCookieConsent(); 11 cc.run({ 12 autoclear_cookies: true, // default: false 13 delay: 0, // default: 0 14 autorun: iandu_cookieconsent_obj.autorun == 'false' ? false : true, // default: true 15 hide_from_bots: false, // default: false 16 remove_cookie_tables: false, // default: false 17 cookie_name: 'iandu_cc_cookie', // default: 'cc_cookie' 18 cookie_data: 'iandu_cc_cookie', // default: 'cc_cookie' 19 cookie_expiration: 182, // default: 182 (days) 20 cookie_necessary_only_expiration: 'disabled', // default: disabled 21 cookie_domain: location.hostname, // default: current domain 22 cookie_path: '/', // default: root 23 cookie_same_site: 'Lax', // default: 'Lax' 24 use_rfc_cookie: false, // default: false 25 current_lang: 'it', 26 theme_css: 'https://www.chiesamodenanonantola.it/wp-content/plugins/iandu-cookieconsent/public/js/../css/iandu-cookieconsent.css?t=1', // replace with a valid path 27 page_scripts: true, // default: false 28 auto_language: null, // default: null; could also be 'browser' or 'document' 29 mode: 'opt-in', // default: 'opt-in'; value: 'opt-in' or 'opt-out' 30 revision: 0, // default: 0 31 force_consent: true, // default: false 32 gui_options: { 33 consent_modal: { 34 layout: 'bar', // box/cloud/bar 35 position: 'bottom center', // bottom/middle/top + left/right/center 36 transition: 'slide', // zoom/slide 37 swap_buttons: true // enable to invert buttons 38 }, 39 settings_modal: { 40 layout: 'box', // box/bar 41 //position: 'left', // left/right 42 transition: 'slide' // zoom/slide 43 } 44 }, 45 onFirstAction: function (user_preferences, cookie) { 46 var date = new Date(); 47 cc.set("data", {"value": date.iandu_format_cookie()}); 48 ianduOnCookieSaved(cookie); 49 }, 50 onAccept: function (cookie) { 51 console.log("onAccept event"); 52 iandu_push_to_datalayer(cookie); 53 }, 54 onChange: function (cookie, changed_preferences) { 55 console.log("onChange event"); 56 if (cc.get('data') != "undefined") { 57 var date = new Date(); 58 cc.set("data", {"value": date.iandu_format_cookie()}); 59 } 60 iandu_push_to_datalayer(cookie); 61 ianduOnCookieSaved(cookie); 62 63 }, 64 languages: { 65 it: { 66 consent_modal: { 67 title: "Informativa", 68 description: "Utilizziamo cookie o tecnologie simili per finalità tecniche e, con il tuo consenso, anche per altre finalit\u00e0 (\"interazioni e funzionalit\u00e0 semplici\", \"miglioramento dell'esperienza\", \"misurazione\" e \"targeting e pubblicit\u00e0\") come specificato nella cookie policy.<br>\n Cliccando su \"accetta\" acconsenti all'utilizzo dei cookie. Cliccando su \"personalizza\" puoi avere maggiori informazioni sui cookie utilizzati e personalizzare le tue preferenze. Cliccando su \"rifiuta\" o chiudendo questa informativa proseguirai la navigazione installando i soli cookie tecnici. Ulteriori informazioni sono disponibili nella <a href=\"\" class=\"cc-link\">cookie policy<\/a> completa.<br>\n ", 69 primary_btn: { 70 text: 'Accetta', 71 role: 'accept_all' // 'accept_selected' or 'accept_all' 72 }, 73 secondary_btn: { 74 text: 'Rifiuta', 75 role: 'accept_necessary' // 'settings' or 'accept_necessary' 76 } 77 }, 78 settings_modal: { 79 title: 'Le tue preferenze relative al consenso', 80 save_settings_btn: 'Salva preferenze', 81 accept_all_btn: 'Accetta tutti', 82 reject_all_btn: 'Accetta necessari', 83 close_btn_label: 'Close', 84 cookie_table_headers: [ 85 {col1: 'Nome'}, 86 {col2: 'Dominio'}, 87 {col3: 'Scadenza'}, 88 /*{col4: 'Description'}*/ 89 ], 90 blocks: blocks 91 } 92 } 93 } 94 }); 95 function iandu_push_to_datalayer(cookie){ 96 if( typeof cookie !== "undefined" && Array.isArray(cookie['level']) ){ 97 for( i = 0; i < cookie['level'].length; i++){ 98 console.log(cookie['level'][i]); 99 /* Qui da inviare push al dataLayer di Google TAG Manager*/ 100 if (typeof dataLayer !== 'undefined') { 101 dataLayer.push({ 102 event: "cc_" + cookie['level'][i] 103 }); 104 } 105 } 106 } 107 } 108 function iandu_define_block() { 109 blocks = [ 110 { 111 title: '', 112 description: 'Il seguente pannello ti consente di esprimere le tue preferenze di consenso alle tecnologie di tracciamento che adottiamo per offrire le funzionalità e svolgere le attività sotto descritte. Per ottenere ulteriori informazioni in merito all\'utilità e al funzionamento di tali strumenti di tracciamento, fai riferimento alla <a href="" class="cc-link">cookie policy</a>. Puoi rivedere e modificare le tue scelte in qualsiasi momento.' 113 } 114 ]; 115 var cookie_table = []; 116 var tablerow = {}; 117 tablerow.col1 = 'PHPSESSID'; 118 tablerow.col2 = 'chiesamodenanonantola.it'; 119 tablerow.col3 = 'Sessione'; 120 if (typeof cookie_table['necessary'] == "undefined") { 121 cookie_table['necessary'] = []; 122 } 123 cookie_table['necessary'].push(tablerow); 124 var tablerow = {}; 125 tablerow.col1 = 'iandu_cc_cookie'; 126 tablerow.col2 = 'chiesamodenanonantola.it'; 127 tablerow.col3 = '182giorni'; 128 if (typeof cookie_table['necessary'] == "undefined") { 129 cookie_table['necessary'] = []; 130 } 131 cookie_table['necessary'].push(tablerow); 132 var tablerow = {}; 133 tablerow.col1 = '_ga'; 134 tablerow.col2 = '.chiesamodenanonantola.it'; 135 tablerow.col3 = '2 anni'; 136 if (typeof cookie_table['analytics'] == "undefined") { 137 cookie_table['analytics'] = []; 138 } 139 cookie_table['analytics'].push(tablerow); 140 var tablerow = {}; 141 tablerow.col1 = '_ga_ZM8N0X5JQF'; 142 tablerow.col2 = '.chiesamodenanonantola.it'; 143 tablerow.col3 = '2 anni'; 144 if (typeof cookie_table['analytics'] == "undefined") { 145 cookie_table['analytics'] = []; 146 } 147 cookie_table['analytics'].push(tablerow); 148 var tablerow = {}; 149 tablerow.col1 = '_gid'; 150 tablerow.col2 = '.chiesamodenanonantola.it'; 151 tablerow.col3 = '24 ore'; 152 if (typeof cookie_table['analytics'] == "undefined") { 153 cookie_table['analytics'] = []; 154 } 155 cookie_table['analytics'].push(tablerow); 156 var tablerow = {}; 157 tablerow.col1 = '_gat'; 158 tablerow.col2 = '.chiesamodenanonantola.it'; 159 tablerow.col3 = '1min'; 160 if (typeof cookie_table['analytics'] == "undefined") { 161 cookie_table['analytics'] = []; 162 } 163 cookie_table['analytics'].push(tablerow); 164 var tablerow = {}; 165 tablerow.col1 = '_pk_id.134'; 166 tablerow.col2 = '.chiesamodenanonantola.it'; 167 tablerow.col3 = '13mesi'; 168 if (typeof cookie_table['analytics'] == "undefined") { 169 cookie_table['analytics'] = []; 170 } 171 cookie_table['analytics'].push(tablerow); 172 var tablerow = {}; 173 tablerow.col1 = '_pk_id*'; 174 tablerow.col2 = '.chiesamodenanonantola.it'; 175 tablerow.col3 = '13mesi'; 176 if (typeof cookie_table['analytics'] == "undefined") { 177 cookie_table['analytics'] = []; 178 } 179 cookie_table['analytics'].push(tablerow); 180 var tablerow = {}; 181 tablerow.col1 = '_pk_sess*'; 182 tablerow.col2 = '.chiesamodenanonantola.it'; 183 tablerow.col3 = '1min'; 184 if (typeof cookie_table['analytics'] == "undefined") { 185 cookie_table['analytics'] = []; 186 } 187 cookie_table['analytics'].push(tablerow); 188 if (typeof cookie_table['necessary'] == "undefined") { 189 cookie_table['necessary'] = []; 190 } 191 if(cookie_table['necessary'].length > 0){ 192 blocks.push({ 193 title: "Tecnici", 194 description: "Questi cookie sono essenziali per il corretto funzionamento del sito web. Senza questi cookie, il sito Web non funzionerebbe correttamente.", 195 toggle: { 196 value: 'necessary', 197 enabled: true, 198 readonly: true // cookie categories with readonly=true are all treated as "necessary cookies" 199 }, 200 cookie_table: cookie_table['necessary'] 201 202 }); 203 } 204 205 if (typeof cookie_table['analytics'] == "undefined") { 206 cookie_table['analytics'] = []; 207 } 208 if(cookie_table['analytics'].length > 0){ 209 blocks.push({ 210 title: "Analitici", 211 description: "Questi cookie consentono al sito web di ricordare le scelte che hai fatto in passato.", 212 toggle: { 213 value: 'analytics', 214 enabled: false, 215 readonly: false // cookie categories with readonly=true are all treated as "necessary cookies" 216 }, 217 cookie_table: cookie_table['analytics'] 218 219 }); 220 } 221 222 if (typeof cookie_table['advertisement'] == "undefined") { 223 cookie_table['advertisement'] = []; 224 } 225 if(cookie_table['advertisement'].length > 0){ 226 blocks.push({ 227 title: "Profilazione", 228 description: "Questi cookie raccolgono informazioni su come utilizzi il sito web, quali pagine hai visitato e quali link hai cliccato. Tutti i dati sono resi anonimi e non possono essere utilizzati per identificarti.", 229 toggle: { 230 value: 'advertisement', 231 enabled: false, 232 readonly: false // cookie categories with readonly=true are all treated as "necessary cookies" 233 }, 234 cookie_table: cookie_table['advertisement'] 235 236 }); 237 } 238 239 if (typeof cookie_table['others'] == "undefined") { 240 cookie_table['others'] = []; 241 } 242 if(cookie_table['others'].length > 0){ 243 blocks.push({ 244 title: "Cookie non ancora classificati in una categoria.", 245 description: "Altri cookie di Terze parti.", 246 toggle: { 247 value: 'others', 248 enabled: false, 249 readonly: false // cookie categories with readonly=true are all treated as "necessary cookies" 250 }, 251 cookie_table: cookie_table['others'] 252 253 }); 254 } 255 256 257 258 259 blocks.push({'title': 'Maggiori informazioni', 260 'description': 'Per qualsiasi domanda in relazione alla nostra politica sui cookie e alle tue scelte, per favore <a class="cc-link" href="https://www.chiesamodenanonantola.it/contatti/">contattaci</a>.' 261 }); 262 return blocks; 263 } 264 265 Date.prototype.iandu_format_cookie = function () { 266 var mm = this.getMonth() + 1; // getMonth() is zero-based 267 var dd = this.getDate(); 268 var hh = this.getHours(); 269 var ii = this.getMinutes();
270 var ss = this.getSeconds(); 271 var ms = this.getMilliseconds(); 272 ms = (ms > 9 ? '' : '0') + ms; 273 return [this.getFullYear(), 274 (mm > 9 ? '' : '0') + mm, 275 (dd > 9 ? '' : '0') + dd, 276 (hh > 9 ? '' : '0') + hh, 277 (ii > 9 ? '' : '0') + ii, 278 (ss > 9 ? '' : '0') + ss, 279 (ms > 99 ? '' : '0') + ms, 280 '-', 281 iandu_get_random_digits(4) 282 ].join(''); 283 }; 284 function iandu_get_random_digits(lenght) { 285 min = 0; 286 max = 9; 287 digits = ''; 288 for (i = 0; i < lenght; i++) { 289 digits += Math.floor(Math.random() * (max - min + 1) + min); 290 } 291 return digits; //The maximum is inclusive and the minimum is inclusive 292 } 293 function ianduCloseBanner(){ 294 cc.hideSettings(); 295 cc.hide(); 296 cc.accept([]); 297 } 298 299 function ianduSaveConsent(cookie){ 300 const formData = new FormData(); 301 formData.append("action", "iandu_register_cookie_consent"); 302 formData.append("security", iandu_cookieconsent_obj.security); 303 formData.append("page_referer", document.location.href); 304 formData.append("html_form", JSON.stringify(document.querySelector("#s-bl").innerHTML)); 305 formData.append("data", JSON.stringify(cookie)); 306 let request = new XMLHttpRequest(); 307 request.addEventListener("load", iandu_cc_success); 308 request.addEventListener("error", iandu_cc_error); 309 request.addEventListener("abort", iandu_cc_abort); 310 request.open("POST", iandu_cookieconsent_obj.ajaxUrl); 311 request.send(formData); 312 } 313 314 function ianduOnCookieSaved(cookie){ 315 316 ianduSaveConsent(cookie); 317 } 318 319 function iandu_cc_success(evt) { 320 window.location.reload(); 321 } 322 323 function iandu_cc_error(evt) { 324 console.warn("Error"); 325 } 326 327 function iandu_cc_abort(evt) { 328 console.warn("Abort"); 329 } 330 331 document.addEventListener("DOMContentLoaded", function() { 332 let closeBtn = document.createElement("button"); 333 closeBtn.className = "c-bn"; 334 closeBtn.setAttribute('type','button'); 335 closeBtn.setAttribute('id','iandu-close-banner'); 336 closeBtn.setAttribute('aria-label','Close'); 337 closeBtn.onclick = function(){ 338 ianduCloseBanner(); 339 }; 340 let customizeBtn = document.createElement("button"); 341 customizeBtn.innerHTML = "Personalizza"; 342 customizeBtn.className = "c-bn"; 343 customizeBtn.setAttribute('type','button'); 344 customizeBtn.onclick = function(){ 345 cc.showSettings(); 346 }; 347 if(document.querySelector('#cm') != null){ 348 document.querySelector('#cm').prepend(closeBtn); 349 } 350 if(document.querySelector('#c-bns') != null){ 351 document.querySelector('#c-bns').prepend(customizeBtn); 352 } 353 354 } 355 ); 356 357 //</script> 358
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.