1jQuery(function ($) { 2 $(".favorite").click(function() { 3 var idp = $('.favorite').data('id'); 4 5 $.ajax({ 6 type: 'post', 7 url: simpleLikes.ajaxurl, 8 data: { 9 action: 'favoritosACT', 10 id_post: idp 11 }, 12 dataType: 'json', 13 beforeSend: function () { 14 $(".icon-fav").addClass("loading") 15 }, 16 success: function (result) { 17 $(".icon-fav").removeClass("loading") 18 if(result.indice===0 || result.indice===1) { 19 Swal.fire({ 20 icon: 'success', 21 title: 'Sucesso!', 22 text: 'Anime adicionado aos favoritos!' 23 }) 24 $(".icon-fav").addClass("on") 25 $(".icon-fav").removeClass("off") 26 $(".favorite .name").html("Favoritado") 27 } else if (result.indice===2) { 28 Swal.fire({ 29 icon: 'success', 30 title: 'Deletado!', 31 text: 'O anime foi excluÃdo dos favoritos!' 32 }) 33 $(".icon-fav").addClass("off") 34 $(".icon-fav").removeClass("on") 35 $(".favorite .name").html("Favoritar") 36 } else if (result.indice===3) { 37 Swal.fire({ 38 icon: 'error', 39 title: 'Oops...', 40 text: 'Você precisa estar logado para marca essa opção!', 41 footer: '<a href="#">Veja nosso guia!</a>' 42 }) 43 $(".icon-fav").addClass("off") 44 $(".favorite .name").html("Favoritar") 45 } 46 } 47 }); 48 }); 49});
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.