1 2// TODO EL CÃDIGO ESTà ENVUELVTA EN ESTA IFFE QUE COMPRUEBA QUE NO ESTAMOS EN LA TIENDA 3// Si estamos en la "shop", nos vamos porque en la tienda no hay footer y no quiero pensar en dónde ponerlo 4(function(){ 5 const estamosEnLaTienda = window.location.href.indexOf('store.php'); 6 if (estamosEnLaTienda > 0) return; 7 8 9 10//Si ya hay un formulario de MailChimp (por ejemplo, el que se pone al final de la última lección disponible de un curso), no inyectamos este otro formulario 11if(!document.querySelector("#mc_embed_signup") && document.querySelector(".my-footer")) { 12 generarInyectarNewsletter(); 13} 14 15// creamos el código a inyectar y la posición a inyectar 16 17function generarInyectarNewsletter () { 18 const codigoNewsletter = ` 19 <!-- Newsletter --> 20 <div class="container-fluid"> 21 <div class="row marco-fullwidth mf-newsletter"> 22 <div class="col-sm-4 col-xs-12"> 23 <img src="resources/share-newsletter.png" class="img-responsive home-img-newsletter" alt="Subscribe to our newsletter"> 24 </div> 25 <div class="col-sm-6 col-xs-12"> 26 <h3>Learn Russian without spam</h3> 27 <p>We want to help you learn Russian. Do you want to receive news from us? Subscribe to our newsletter. You will only receive one email a month with 100% news and 0% spam:</p> 28 </div> 29 <div class="col-xs-12"> 30 <!-- Begin Brevo Form --> 31 32 <style> 33 @font-face { 34 font-display: block; 35 font-family: Roboto; 36 src: url(https://assets.brevo.com/font/Roboto/Latin/normal/normal/7529907e9eaf8ebb5220c5f9850e3811.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/normal/normal/25c678feafdc175a70922a116c9be3e7.woff) format("woff") 37 } 38 39 @font-face { 40 font-display: fallback; 41 font-family: Roboto; 42 font-weight: 600; 43 src: url(https://assets.brevo.com/font/Roboto/Latin/medium/normal/6e9caeeafb1f3491be3e32744bc30440.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/medium/normal/71501f0d8d5aa95960f6475d5487d4c2.woff) format("woff") 44 } 45 46 @font-face { 47 font-display: fallback; 48 font-family: Roboto; 49 font-weight: 700; 50 src: url(https://assets.brevo.com/font/Roboto/Latin/bold/normal/3ef7cf158f310cf752d5ad08cd0e7e60.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/bold/normal/ece3a1d82f18b60bcce0211725c476aa.woff) format("woff") 51 } 52 53 #sib-container input:-ms-input-placeholder { 54 text-align: left; 55 font-family: "Helvetica", sans-serif; 56 color: #c0ccda; 57 } 58 59 #sib-container input::placeholder { 60 text-align: left; 61 font-family: "Helvetica", sans-serif; 62 color: #c0ccda; 63 } 64 65 #sib-container textarea::placeholder { 66 text-align: left; 67 font-family: "Helvetica", sans-serif; 68 color: #c0ccda; 69 } 70 71 #sib-container a { 72 text-decoration: underline; 73 color: #2BB2FC; 74 } 75 </style> 76 <link rel="stylesheet" href="https://sibforms.com/forms/end-form/build/sib-styles.css"> 77 78 <div class="sib-form" style="text-align: center; 79 background-color: transparent; "> 80 <div id="sib-form-container" class="sib-form-container"> 81 <div id="error-message" class="sib-form-message-panel" style="font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-color:#ff4949;max-width:540px;"> 82 <div class="sib-form-message-panel__text sib-form-message-panel__text--center"> 83 <svg viewBox="0 0 512 512" class="sib-icon sib-notification__icon"> 84 <path d="M256 40c118.621 0 216 96.075 216 216 0 119.291-96.61 216-216 216-119.244 0-216-96.562-216-216 0-119.203 96.602-216 216-216m0-32C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm-11.49 120h22.979c6.823 0 12.274 5.682 11.99 12.5l-7 168c-.268 6.428-5.556 11.5-11.99 11.5h-8.979c-6.433 0-11.722-5.073-11.99-11.5l-7-168c-.283-6.818 5.167-12.5 11.99-12.5zM256 340c-15.464 0-28 12.536-28 28s12.536 28 28 28 28-12.536 28-28-12.536-28-28-28z" /> 85 </svg>
86 <span class="sib-form-message-panel__inner-text"> 87 We were unable to validate your subscription. 88 </span> 89 </div> 90 </div> 91 <div></div> 92 <div id="success-message" class="sib-form-message-panel" style="font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#085229; background-color:#e7faf0; border-radius:3px; border-color:#13ce66;max-width:540px;"> 93 <div class="sib-form-message-panel__text sib-form-message-panel__text--center"> 94 <svg viewBox="0 0 512 512" class="sib-icon sib-notification__icon"> 95 <path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 464c-118.664 0-216-96.055-216-216 0-118.663 96.055-216 216-216 118.664 0 216 96.055 216 216 0 118.663-96.055 216-216 216zm141.63-274.961L217.15 376.071c-4.705 4.667-12.303 4.637-16.97-.068l-85.878-86.572c-4.667-4.705-4.637-12.303.068-16.97l8.52-8.451c4.705-4.667 12.303-4.637 16.97.068l68.976 69.533 163.441-162.13c4.705-4.667 12.303-4.637 16.97.068l8.451 8.52c4.668 4.705 4.637 12.303-.068 16.97z" /> 96 </svg> 97 <span class="sib-form-message-panel__inner-text"> 98 Your subscription has been made. 99 </span> 100 </div> 101 </div> 102 <div></div> 103 <div id="sib-container" class="sib-container--large sib-container--vertical" style="text-align:center; background-color:transparent; max-width:540px; border-radius:3px; border-width:0px; border-color:#C0CCD9; border-style:solid; direction:ltr"> 104 <form id="sib-form" method="POST" action="https://3a8bffcb.sibforms.com/serve/MUIFAI6f6-sbopD1xu7zytDE7HtZHHi9Prb3nbiD8lUE_pSfyjUDp_06w3Hzi2htegIDyyJ-9b1VkZrfxI8rfakTMzLk2GeyDeooHKYbv5YYaXfbvELL7xP8ArRC8qHnLf9Xl_Lehd2V0sM1h0bLWYtMODvdvrG3v7x9W-7cF4gGq5dscEVM5iAR50Wu7UPb9IL_T2jhGSKyBnTS" data-type="subscription"> 105 <div style="padding: 0;"> 106 <div class="sib-input sib-form-block"> 107 <div class="form__entry entry_block"> 108 <div class="form__label-row "> 109 <label class="entry__label" style="font-weight: 700; text-align:left; font-size:14px; text-align:left; font-weight:700; font-family:"Helvetica", sans-serif; color:#ffffff;" for="EMAIL" data-required="*">E-mail address</label> 110 111 <div class="entry__field"> 112 <input class="input " type="text" id="EMAIL" name="EMAIL" autocomplete="off" placeholder="" data-required="true" required /> 113 </div> 114 </div> 115 116 <label class="entry__error entry__error--primary" style="font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-color:#ff4949;"> 117 </label> 118 </div> 119 </div> 120 </div> 121 <div style="padding: 0;"> 122 <div class="sib-input sib-form-block"> 123 <div class="form__entry entry_block"> 124 <div class="form__label-row "> 125 <label class="entry__label" style="font-weight: 700; text-align:left; font-size:14px; text-align:left; font-weight:700; font-family:"Helvetica", sans-serif; color:#ffffff;" for="FIRSTNAME" data-required="*">First Name</label> 126 127 <div class="entry__field"> 128 <input class="input " maxlength="200" type="text" id="FIRSTNAME" name="FIRSTNAME" autocomplete="off" placeholder="" data-required="true" required /> 129 </div> 130 </div> 131 132 <label class="entry__error entry__error--primary" style="font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-color:#ff4949;"> 133 </label> 134 </div> 135 </div> 136 </div> 137 <div style="padding: 0;"> 138 <div class="sib-input sib-form-block"> 139 <div class="form__entry entry_block"> 140 <div class="form__label-row "> 141 <label class="entry__label" style="font-weight: 700; text-align:left; font-size:14px; text-align:left; font-weight:700; font-family:"Helvetica", sans-serif; color:#ffffff;" for="LASTNAME">Last Name</label> 142 143 <div class="entry__field"> 144 <input class="input " maxlength="200" type="text" id="LASTNAME" name="LASTNAME" autocomplete="off" placeholder="" /> 145 </div> 146 </div> 147 148 <label class="entry__error entry__error--primary" style="font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-color:#ff4949;"> 149 </label> 150 </div> 151 </div> 152 </div> 153 <div style="padding: 0;"> 154 <div class="sib-form-block" style="text-align: left"> 155 <button class="sib-form-block__button sib-form-block__button-with-loader" style="font-size:15px; text-align:left; font-family:"Helvetica", sans-serif; color:#FFFFFF; background-color:#1d4f96; border-radius:4px; border-width:0px;" form="sib-form" type="submit"> 156 <svg class="icon clickable__icon progress-indicator__icon sib-hide-loader-icon" viewB
156ox="0 0 512 512"> 157 <path d="M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z" /> 158 </svg> 159 SUBSCRIBE 160 </button> 161 </div> 162 </div> 163 164 <input type="text" name="email_address_check" value="" class="input--hidden"> 165 <input type="hidden" name="locale" value="es"> 166 </form> 167 </div> 168 </div> 169 </div> 170 <!-- End Brevo Form --> 171 </div> 172 </div> 173 </div> 174 175 ` 176 177 const huecoInyectarNewsletter = document.querySelector(".my-footer").closest(".container-fluid"); 178 huecoInyectarNewsletter.insertAdjacentHTML("beforebegin", codigoNewsletter); 179 } 180 181 182 183// FIN DE LA IIFE que comprueba que no estamos en la tienda 184// --- No escribir nada debajo de esta lÃnea 185})();
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.