1jQuery(document).ready(function ($) { 2 var title = $(document).attr("title"); 3 var url_whats = $("#urlWhats").val(); 4 var url_email = $("#urlEmail").val(); 5 $("#whatsapp").attr( 6 "href", 7 "https://api.whatsapp.com/send?text=" + 8 encodeURIComponent(title + " " + url_whats) 9 ); 10 $("#email").attr( 11 "href", 12 "mailto:?subject=" + 13 encodeURIComponent(title) + 14 "&body=" + 15 title + 16 " " + 17 url_email 18 ); 19 20 var data; 21 22 createShareButtonsTop(); 23 showWhatsAppShareButton(); 24 if (/single-edicao/.test(jQuery("body").attr("class")) != true) { 25 createShareButtonsBotton(); 26 changePositionRelatedPosts(); 27 if (jQuery("#fb-shortcode").length == 0) { 28 setTimeout(changePositionFBComments, 2000); 29 } 30 } 31}); 32 33var $ = jQuery; 34 35function getPostId() { 36 var postId; 37 if (jQuery("body").hasClass("home")) { 38 postId = jQuery("article[id*='post-']").attr("id").replace("post-", ""); 39 } else { 40 postId = post.id; 41 } 42 return postId; 43} 44 45function createShareButtonsTop() { 46 if (jQuery("article").children().hasClass("entry-content")) { 47 jQuery("#share-buttons").prependTo( 48 jQuery("article div[class*='entry-content']").eq(0) 49 ); 50 } else { 51 if (jQuery("article").children().hasClass("tabbable")) { 52 jQuery("#share-buttons").prependTo( 53 jQuery("article div[class*='tabbable']").eq(0) 54 ); 55 } else { 56 jQuery("#share-buttons").prependTo( 57 jQuery("div[class*='entry-content']").eq(0) 58 ); 59 } 60 } 61 jQuery("#share-buttons").show(); 62} 63 64function showWhatsAppShareButton() { 65 jQuery("ul#share-buttons #sh-whats").show(); 66} 67 68function createShareButtonsBotton() { 69 if (jQuery("article").children().hasClass("entry-content")) { 70 jQuery("#share-widget-horizontal").appendTo( 71 jQuery("article div[class*='entry-content']").eq(0) 72 ); 73 } else { 74 if (jQuery("article").children().hasClass("tabbable")) { 75 jQuery("#share-widget-horizontal").appendTo( 76 jQuery("article div[class*='tabbable']").eq(0) 77 ); 78 } else if ( 79 jQuery("div[class*='entry-content']").eq(0).attr("class") != undefined 80 ) { 81 jQuery("#share-widget-horizontal").appendTo( 82 jQuery("div[class*='entry-content']").eq(0) 83 ); 84 } else { 85 jQuery("#share-widget-horizontal").appendTo( 86 jQuery("div[id*='content-post']").eq(0) 87 ); 88 } 89 } 90 jQuery("#share-widget-horizontal").show(); 91} 92 93function changePositionRelatedPosts() { 94 var relatedPostsTitle = jQuery("h2.simple-related-posts-title").detach(); 95 var relatedPosts = jQuery("ul.simple-related-posts").detach(); 96 if (relatedPosts.length > 0 && relatedPostsTitle.length > 0) { 97 jQuery("article div[class='entry-content']") 98 .eq(0) 99 .append(relatedPostsTitle); 100 jQuery("article div[class='entry-content']").eq(0).append(relatedPosts); 101 } 102} 103 104function changePositionFBComments() { 105 var FBTitleComments = jQuery("h3.title-comments").detach(); 106 var FBCountComments = jQuery("p.count-comments").detach(); 107 var FBComments = jQuery("div.fb-comments").detach(); 108 109 if (FBTitleComments.length > 0 || FBComments.length > 0) { 110 jQuery("article div[class~='entry-content']").eq(0).append(FBTitleComments); 111 112 if (FBCountComments.length > 0) { 113 jQuery("article div[class~='entry-content']") 114 .eq(0) 115 .append(FBCountComments); 116 } 117 jQuery("article div[class~='entry-content']").eq(0).append(FBComments); 118 } 119}
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.