1(function ($) { 2 $(document).ready(function () { 3 4 // console.log("custom-logout.js: loaded"); 5 6 function custom_logout(e) { 7 e.preventDefault(); 8 data = new Object; 9 data.action = "custom_logout"; 10 $.post(ajaxurl, data) 11 .done(response => { 12 window.location.href = "https://www.reclamaciondevuelos.com"; 13 }) 14 .fail(response => { 15 // Debido a wp_logout() en PHP, devuelve un error de XHR, pero se ejecuta ok. Redirigimos desde aquÃ. 16 window.location.href = "https://www.reclamaciondevuelos.com"; 17 }) 18 } 19 20 let logout_link = ""; 21 let ab_items = $("a.ab-item"); 22 if (ab_items.length > 0) { 23 ab_items.each(function () { 24 let href = $(this).prop("href"); 25 if (href.search("logout") !== -1) { 26 logout_link = $(this); 27 } 28 }); 29 if (logout_link !== "") { 30 // console.log("custom-logout.js: upper right link active"); 31 logout_link.click(custom_logout); 32 } 33 } 34 35 if ($("#cerrar_sesion_panel").length > 0) { 36 // console.log("custom-logout.js: user area link active"); 37 $("#cerrar_sesion_panel").click(custom_logout); 38 } 39 }); 40})(jQuery)
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.