1$(document).ready(function () { 2 if ($('#category')) { 3 $( document ).ajaxComplete(function(event, xhr, settings) { 4 if (settings.url) { 5 url = settings.url; 6 if (url.match(/page=/)) { 7 $("#ec_seo_description2").hide(); 8 } else { 9 $("#ec_seo_description2").show(); 10 } 11 } 12 }); 13 } 14 15 cpt_img = 0; 16 cpt_total_img = 0; 17 $( "img" ).each(function() { 18 if ($(this).attr('alt')) { 19 if ($(this).attr('alt').length == 0) { 20 cpt_img++; 21 } 22 } 23 cpt_total_img++; 24 }); 25 /* console.log(cpt_img); 26 console.log(cpt_total_img); */ 27 if (cpt_img == 0) { 28 content =$('.seo-txt-item.good.imagegood span.txt').html()+cpt_total_img+').'; 29 $('.seo-txt-item.good.imagegood span.txt').html(content); 30 $('.seo-txt-item.good.imagegood').show(); 31 } else { 32 content =cpt_img+' '+$('.seo-txt-item.bad.imagebad span.txt').html()+cpt_total_img+').'; 33 $('.seo-txt-item.bad.imagebad span.txt').html(content); 34 $('.seo-txt-item.bad.imagebad').show(); 35 } 36 37 open_graph = ['title','url','description','site_name','image','type','locale']; 38 for (i in open_graph) { 39 if ($('meta[property="og:'+open_graph[i]+'"]').attr('content')) { 40 if ($('meta[property="og:'+open_graph[i]+'"]').attr('content').length == 0) { 41 $('.seo-txt-item.bad.og'+open_graph[i]+'bad').show(); 42 } else { 43 $('.seo-txt-item.good.og'+open_graph[i]+'good').show(); 44 } 45 } else { 46 $('.seo-txt-item.bad.og'+open_graph[i]+'bad').show(); 47 } 48 } 49 lexical = new Object(); 50 global_content = ''; 51 tab_h1 = []; 52 cpt_h1 = 0; 53 $( "h1" ).each(function() { 54 content = $(this).html(); 55 global_content += ' '+content; 56 tab_h1.push('"'+content.trim()+'"'); 57 cpt_h1++; 58 }); 59 $('.cpt_h1').html(cpt_h1); 60 if (cpt_h1 == 0) { 61 $('.seo-txt-item.bad.baliseh1ine').show(); 62 } else if (cpt_h1 > 1) { 63 $('.seo-txt-item.bad.baliseh1mul .h1_nb').html(cpt_h1); 64 $('.seo-txt-item.bad.baliseh1mul .h1_content').html(tab_h1.join(', ')); 65 $('.seo-txt-item.bad.baliseh1mul').show(); 66 } else { 67 $('.seo-txt-item.good.baliseh1ok').show(); 68 } 69 70 cpt_h2 = $( "h2" ).length; 71 72 $('.cpt_h2').html(cpt_h2); 73 if (cpt_h2 == 0) { 74 $('.seo-txt-item.bad.h2bad').show(); 75 } else if (cpt_h2 > 10) { 76 $('.seo-txt-item.bad.h2bad2').show(); 77 } else { 78 $('.seo-txt-item.good.h2good').show(); 79 } 80 81 cpt_h3 = $( "h3" ).length; 82 $('.cpt_h3').html(cpt_h3); 83 if (cpt_h3 == 0) { 84 $('.seo-txt-item.bad.h3bad').show(); 85 } else if (cpt_h3 > 10) { 86 $('.seo-txt-item.bad.h3bad2').show(); 87 } else { 88 $('.seo-txt-item.good.h3good').show(); 89 } 90 91 cpt_h4 = $( "h4" ).length; 92 $('.cpt_h4').html(cpt_h4); 93 94 cpt_h5 = $( "h5" ).length; 95 $('.cpt_h5').html(cpt_h5); 96 97 cpt_h6 = $( "h6" ).length; 98 $('.cpt_h6').html(cpt_h6); 99 100 cpt_strong = $( "strong" ).length; 101 if (cpt_strong == 0) { 102 $('.seo-txt-item.bad.strongbad').show(); 103 } else { 104 $('.seo-txt-item.good.stronggood').show(); 105 } 106 107 108 if ($('.breadcrumb').length > 0) { 109 $('.seo-txt-item.good.breadgood').show(); 110 } else { 111 $('.seo-txt-item.bad.breadbad').show(); 112 } 113 if (ec_ps_version17) { 114 baseUri = prestashop.urls.base_url; 115 } 116 var re = new RegExp(baseUri, 'g'); 117 tab_interne = []; 118 tab_doublon = []; 119 temp_doublon = []; 120 tab_no_follow = []; 121 $( "a" ).each(function() { 122 href = $(this).attr('href'); 123 if (href != '#') { 124 rel = $(this).attr('rel'); 125 if (rel) { 126 if (rel == 'nofollow') { 127 tab_no_follow.push(href); 128 } 129 } 130 131 if (href) { 132 if (href.match(re)) { 133 tab_interne.push(href); 134 } 135 if (temp_doublon[href]) { 136 if(jQuery.inArray(href, tab_doublon) == -1) { 137 tab_doublon.push(href); 138 } 139 } else { 140 temp_doublon[href] = href; 141 } 142 } 143 } 144 });
145 $('.ec_lien_int').html(tab_interne.length); 146 $('.ec_lien_nf').html(tab_no_follow.length); 147 $('.ec_lien_db').html(tab_doublon.length); 148});
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.