1(function ($, Drupal) { 2 /*global jQuery:false */ 3 /*global Drupal:false */ 4 "use strict"; 5 6 $(".custom-paragraph-img-text-special .field--name-field-image-with-text .field--item:nth-child(odd) .field--name-field-description").addClass("wow fadeInRight"); 7 $(".custom-paragraph-img-text-special .field--name-field-image-with-text .field--item:nth-child(odd) .field--name-field-image").addClass("wow fadeInRight"); 8 $(".custom-paragraph-img-text-special .field--name-field-image-with-text .field--item:nth-child(even) .field--name-field-description").addClass("wow fadeInLeft"); 9 $(".custom-paragraph-img-text-special .field--name-field-image-with-text .field--item:nth-child(even) .field--name-field-image").addClass("wow fadeInLeft"); 10 $(".moreBox").slice(0, 4).show(); 11 $("#loadMore").on('click', function (e) { 12 e.preventDefault(); 13 $(".moreBox:hidden").slice(0, 80).slideDown(); 14 if ($(".moreBox:hidden").length == 0) { 15 $("#loadMore").fadeOut('slow'); 16 } 17 }); 18 19 /** 20 * Provide vertical tab summaries for Bootstrap settings. 21 */ 22 Drupal.behaviors.pageMultimedia = { 23 attach: function (context) { 24 //Poner clase activa al .form-item-field-multimedia-category-target-id 25 jQuery(".view-multimedia .form-item-field-multimedia-category-target-id input[type=radio]:checked").parent().parent().addClass("activo"); 26 27 } 28 } 29 30 //firebase, your web app's Firebase configuration 31 var firebaseConfig = { 32 apiKey: "AIzaSyAwADzH65-vAptVBBs0LU9f5nR9iesizio", 33 authDomain: "convoca-7d819.firebaseapp.com", 34 databaseURL: "https://convoca-7d819.firebaseio.com", 35 projectId: "convoca-7d819", 36 storageBucket: "convoca-7d819.appspot.com", 37 messagingSenderId: "986003285962", 38 appId: "1:986003285962:web:6dc63e90409bca46545133", 39 measurementId: "G-9S8HVVH0NH" 40 }; 41 // Initialize Firebase 42 firebase.initializeApp(firebaseConfig); 43 firebase.analytics(); 44 const messaging = firebase.messaging(); 45 var db = firebase.firestore(); 46 47 var registrarToken = function (accion) { 48 messaging.getToken().then((currentToken) => { 49 if (currentToken) { 50 console.log(currentToken); 51 db.collection("suscriptores").add({ 52 currentToken: currentToken, 53 accion: accion, 54 location: location.href, 55 agente: window.navigator.userAgent 56 }) 57 } else { 58 // Show permission request. 59 console.log('No Instance ID token available. Request permission to generate one.'); 60 // Show permission UI. 61 console.log("updateUIForPushPermissionRequired()"); 62 } 63 }).catch((err) => { 64 console.log(err); 65 setTimeout(function () { 66 registrarToken(1); 67 }, 2000); 68 }); 69 } 70 messaging.onMessage((payload) => { 71 console.log('Message received. ', payload); 72 // ... 73 if (typeof payload.notification === "undefined") { 74 location.href = payload.data.url; 75 } else { 76 var notification = new Notification(payload.notification.title, { 77 icon: 'https://convoca.pe/themes/convoca/logo_convoca_cuadrado.png', 78 body: payload.notification.body, 79 image: payload.notification.image 80 }); 81 notification.onclick = function () { 82 window.location.href = (payload.data.url); 83 }; 84 } 85 86 }); 87 messaging.onTokenRefresh(() => { 88 messaging.getToken().then((refreshedToken) => { 89 console.log('Token refreshed.'); 90 registrarToken(2); 91 }).catch((err) => { 92 console.log('Unable to retrieve refreshed token ', err); 93 }); 94 }); 95 96 // Comprobamos si el navegador soporta las notificaciones 97 if (!("Notification" in window)) { 98 console.log("Este navegador no es compatible con las notificaciones de escritorio"); 99 } else if (Notification.permission === "denied") { 100 console.log('denego los permisos'); 101 } else if (Notification.permission === "granted") { 102 //registrarToken(); 103 } else { 104 //mostrar poopup?? 105 var fechaMensaje = localStorage.getItem('mensajeConfirmacion'); 106 var dFechaMensaje = new Date(); 107 if (fechaMensaje != dFechaMensaje.getUTCDate().toString()) { 108 localStorage.setItem('mensajeConfirmacion', dFechaMensaje.getUTCDate()); 109 setTimeout(function () { 110 jQuery(".confirmacion").fadeIn("slow"); 111 }, 3000); 112 } 113 } 114 // 115 jQuery(".permitirBtn").click(function () { 116 jQuery(".confirmacion").fadeOut("fast"); 117 messaging.requestPermission() 118 .then(function () { 119 console.log('Recibido permiso.'); 120 setTimeout(function () { 121 registrarToken(1); 122 }, 3000); 123 }) 124 .catch(function (err) { 125 console.log('No se ha obtenido permiso', err); 126 }); 127 }); 128 jQuery(".cancelBtn").click(function () { 129 jQuery(".confirmacion").fadeOut("fast"); 130 }); 131 132 133 if ('serviceWorker' in navigator) { 134 window.addEventListener('load', () => { 135 navigator.serviceWorker.register('/firebase-messaging-sw.js') 136 .then(reg => { 137 console.log('Registration succeeded. Scope is ' + reg.scope); 138 }) 139 .catch(registrationError => { 140 console.log('SW registration failed: ', registrationError); 141 }); 142 }); 143 } 144 let date = new Date(); 145 let day = date.getDate(); 146 147 if( localStorage.getItem("banner") != day ){ 148 jQuery(".banner_inferior").fadeIn(); 149 } 150 151 152})(window.jQuery, Drupal); 153 154var fnOcultar=function(){ 155 let date = new Date(); 156 let day = date.getDate(); 157 158 jQuery(".banner_inferior").fadeOut(); 159 localStorage.setItem("banner",day); 160} 161 162window.jQuery(document).ready(function () { 163 var valorRandom = Math.random(); 164 jQuery.getScript("/themes/convoca/js/custom_v1.js?r=" + valorRandom); 165}); 166 167function mostrarMenu() { 168 var display = jQuery('.lateral-nav').css('display'); 169 if (display === 'block') { 170 jQuery("#abrir img").attr("src", "/sites/default/files/2018-06/menu-white.png"); 171 } else { 172 jQuery("#abrir img").attr("src", "/sites/default/files/close-3.png"); 173 } 174 jQuery('.lateral-nav').fadeToggle('slow'); 175} 176jQuery(".menu--main > li > ul > li:nth-child(4)").click(function () { 177 setTimeout(function () { 178 jQuery(".custom-main-nav .expanded.dropdown ").addClass("open") 179 jQuery(".menu--main > li > ul > li:nth-child(4) > ul").show(); 180 }, 200); 181}); 182 183document.getElementById('abrirmenu').addEventListener('click', function () { 184 document.getElementById("mySidenav").style.width = "45%"; 185 // document.getElementById("mySidenav").style.setProperty("width", "40%", "important"); 186 //document.getElementById("mySidenav").style.paddingRight = "30px"; 187 document.getElementById("sideElementOne").style.paddingRight = "30px"; 188 document.getElementById("sideElementOne").style.height = "70%"; 189 document.getElementById("sideElementTwo").style.paddingRight = "30px"; 190 document.getElementById("sideElementTwo").style.height = "30%"; 191 document.body.style.backgroundColor = "rgba(0,0,0,0.4)"; 192}); 193 194document.getElementById('cerrarmenu').addEventListener('click', function () { 195 //document.getElementById("mySidenav").style.width = "0"; 196 document.getElementById("mySidenav").style.setProperty("width", "0", "important"); 197 document.getElementById("main").style.marginLeft= "0"; 198 document.getElementById("mySidenav").style.paddingRight = "0"; 199 document.body.style.backgroundColor = "white"; 200}); 201
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.