1window.onload = function() { 2 if (window.jQuery) { 3 4 var cookie = tznslttr_getCookie('tznwslttr'); 5//cookie = false; 6 if (!cookie) { 7 setTimeout(function () { 8 jQuery('body').append( 9 "<style>" + 10 "@media(max-width: 960px){" + 11 ".tzRow{ flex-direction: column}" + 12 ".tzCell{ width: 100%!important; margin-right: 0px!important}" + 13 ".tzNlttrContainer{padding: 15px 40px 20px 40px!important; width: auto}" + 14 ".tzNlttrTitle{font-size: 15px !important; line-height: 34px!important; margin-bottom: 15px}" + 15 "#tzNlttrBox input{height: 50px!important;}" + 16 "#tzNlttrBox button{padding-top: 17px!important; padding-bottom: 17px!important}" + 17 "#tzDataInfoToggle{display: inline-block; margin: 5px 0}" + 18 "#tzDataInfoBox{margin: 10px 0 !important}" + 19 "#tzDataInfoBox p{font-size: 12px!important}" + 20 "#tzNlttrClose{top: 20px!important;right: 22px!important}" + 21 "}" + 22 "</style>" 23 ); 24 jQuery('body').append( 25 "<div id='tzNlttrBox' tabindex='-1' style='z-index: 99999;position: fixed; top: 0px; left: 0px;right: 0px;height: auto;background: #c7c7c7;box-shadow: 0 1px 1px rgb(0 0 0 / 30%);transition:0.3s'>" + 26 "<div id='tzNlttrClose' style='cursor: pointer;position: absolute; top: calc(50% - 11px); right: 30px'><svg class=\"country-popup-close btn-close position-absolute\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 14 14\"><g><g><path fill=\"none\" stroke=\"#000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"50\" stroke-width=\"2\" d=\"M12.238 1.594L1.852 12.702\"></path></g><g><path fill=\"none\" stroke=\"#000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"50\" stroke-width=\"2\" d=\"M12.238 12.702L1.852 1.594\"></path></g></g></svg></div>" + 27 "<div class='container grid-container tzNlttrContainer' style='padding: 25px 0'>" + 28 "<div class='tzRow' style='display:flex;align-items: center;'>" + 29 "<div class='tzCell' style='width: 70%;display:flex;align-items: center; margin-right: 15px;'>" + 30 "<p class='tzNlttrTitle' style='font-size: 28px; line-height: 34px;'>" + 31 "<span style='color: rgb(0, 0, 0);'>" + 32 "SuscrÃbete a nuestra <b><i>NEWSLETTER</i></b>." + 33 "</span>" + 34 "</p>" + 35 "</div>" + 36 "<div class='tzCell' style='width: 22%;display:flex;align-items: center;'>" + 37 "<input type=\"email\" id='tzNlttrEmail' tabindex=\"0\" placeholder=\"Email\" aria-label=\"Email\" aria-invalid=\"false\" style=\"box-sizing: border-box; margin-top: 0px!important; padding: 0px 0px 0px 16px; height: 70px; width: 100%; text-align: left; color: rgb(0, 0, 0); font-size: 14px; font-weight: 400; letter-spacing: 0px; background-color: rgb(255, 255, 255); border: 1px solid black;\" id=\"tznwslttr_email\">" + 38 "</div>" + 39 "<div class='tzCell' style='width: 18%;display:flex;align-items: center;'>" + 40 "<button type=\"button\" id='tzNlttrSubmit' tabindex=\"0\" style=\"background: rgb(0, 0, 0); border-radius: 0px; border-style: solid; border-color: rgb(0, 0, 0); margin-top: 0px!important; border-width: 1px; color: rgb(255, 255, 255);font-size: 16px; font-weight: 600; letter-spacing: 1px; line-height: 1; white-space: normal; padding-top: 26px; padding-bottom: 26px; text-align: center; word-break: break-word; align-self: flex-end; cursor: pointer; height: auto; width: 100%;\">SUSCRIBIRME</button>" + 41 "</div>" + 42 "</div>" + 43 "<div class='tzRow' style='display:flex;margin-top:5px'>" + 44 "<div class='tzCell' style='width: 70%;margin-right: 15px;'>" + 45 "<span style='user-select: none;cursor: pointer;background-color: black;color: white;padding:4px 10px;font-size:12px;font-weight:600' id='tzDataInfoToggle'>Tus datos 100% seguros <i style='border: solid white;border-width: 0 2px 2px 0;display: inline-block;padding: 3px;transform: rotate(45deg);-webkit-transform: rotate(45deg);margin: 0 0 1px 5px;'></i></span>" + 46 "<div id='tzDataInfoBox' style='display: none; padding: 10px;margin-top: 2px;border: 1px solid black'>" + 47 "<p style='font-size: 12px;line-height: 16px'><b>Responsable » </b> Tendenzias Media SL. <br>" + 48 "<b>Finalidad » </b> Gestionar el alta a esta suscripción y remitir boletines periódicos con información y oferta prospectiva de productos o servicios propios.<br>" + 49 "<b>Legitimación » </b> Consentimiento del interesado.<br>" + 50 "<b>Destinatarios » </b> Tus datos se almacenarán en un hosting de OVH autogestionado por Tendenzias Media SL.<br>" + 51 "<b>Derechos » </b> Podrás ejercer tus derechos de acceso, rectificación y suprimir los datos en [email protected] asà como el derecho a presentar una reclamación ante una autoridad de control." + 52 "</p>" + 53 "</div>" + 54 "</div>" + 55 "<div class='tzCell' style='width: 40%;'>" + 56 "<div id='tzNlttrErrors'></div>" + 57 "<span style='font-size: 11px;margin-top: 8px; text-align: center'>Al suscribirme confirmo haber leido y entiendo la <a href='/politica-de-privacidad/' style='text-decoration: underline' target='_blank' rel='nofollow'>PolÃtica de privacidad</a> y acepto recibir comunicaciones comerciales personzalizadas.</span>" + 58 "</div>" + 59 "</div>" + 60 "</div>" + 61 "</div>" + 62 "</div>" 63 ); 64 65 tznslttr_setCookie('tznwslttr', 'opened', 7); 66
67 jQuery("body #tzDataInfoToggle").click(function () { 68 69 if (jQuery(this).hasClass("open")) { 70 jQuery(this).removeClass("open"); 71 jQuery("body #tzDataInfoBox").hide(); 72 } else { 73 jQuery(this).addClass("open"); 74 jQuery("body #tzDataInfoBox").show(); 75 } 76 }); 77 78 jQuery("body #tzNlttrClose").click(function () { 79 jQuery("body #tzNlttrBox").fadeOut(); 80 }); 81 82 jQuery("body #tzNlttrSubmit").click(function () { 83 var email = jQuery("body #tzNlttrEmail").val(); 84 85 if (/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(email)) { 86 87 jQuery.ajax({ 88 url: 'https://www.cloudflare.com/cdn-cgi/trace', 89 timeout: 1500 //3 second timeout 90 }).done(function (response) { 91 response = response.trim().split('\n').reduce(function (obj, pair) { 92 pair = pair.split('='); 93 return obj[pair[0]] = pair[1], obj; 94 }, {}); 95 var data = { 96 email: email, 97 ref: window.location.href, 98 country: response.loc ? response.loc : "N/D", 99 city: response.colo ? response.colo : "N/D" 100 }; 101 tznslttr_suscribe(data); 102 }).fail(function (jqXHR, textStatus) { 103 var data = {email: email, ref: window.location.href, country: "N/D", colo: "N/D"}; 104 tznslttr_suscribe(data); 105 }); 106 } else { 107 jQuery("body #tzNlttrErrors").html( 108 "<p style='color: firebrick'>Vaya... Parece que hay datos inválidos.</p>" 109 ); 110 } 111 112 }); 113 }, 45000); 114 } else { 115 console.log("Newsletter already shown!"); 116 } 117 118 function tznslttr_suscribe(data) { 119 jQuery.ajax({ 120 url: '/wp-content/plugins/tz-newsletter-popup/register_user.php', 121 data: data, 122 method: 'post', 123 dataType: 'json', 124 success: function (response) { 125 console.log(response); 126 if (response == "ok.") { 127 jQuery("body #tzNlttrErrors").html( 128 "<p style='color: darkolivegreen'>¡Genial! Ya estás al tanto de todo.</p>" 129 ); 130 setTimeout(function () { 131 jQuery("body #tzNlttrBox").fadeOut(); 132 }, 1500); 133 } else { 134 jQuery("body #tzNlttrErrors").html( 135 "<p style='color: firebrick'>Ocurrió un error inesperado.</p>" 136 ); 137 } 138 }, 139 error: function (error) { 140 jQuery("body #tzNlttrErrors").html( 141 "<p style='color: firebrick'>Vaya... Ocurrió un error inesperado.</p>" 142 ); 143 } 144 }); 145 } 146 147 148 function tznslttr_getCookie(cname) { 149 var name = cname + "="; 150 var decodedCookie = decodeURIComponent(document.cookie); 151 var ca = decodedCookie.split(';'); 152 for (var i = 0; i < ca.length; i++) { 153 var c = ca[i]; 154 while (c.charAt(0) == ' ') { 155 c = c.substring(1); 156 } 157 if (c.indexOf(name) == 0) { 158 return c.substring(name.length, c.length); 159 } 160 } 161 return false;
162 } 163 164 function tznslttr_setCookie(cname, cvalue, exdays) { 165 const d = new Date(); 166 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 167 var expires = "expires=" + d.toUTCString(); 168 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 169 } 170 171 } 172}
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.