1//////////////////////////////// 2//Copyright Net Maintain 2021 // 3//////////////////////////////// 4 5jQuery( document ).ready( function( $ ) { 6 const reg = /^(http|https):\/\/[^ "]+$/; 7 var dom = window.location.origin; 8 var imgurls = []; 9 function nm_reg_test_url($path){ 10 if (reg.test($path)) { 11 return $path; 12 } else { 13 return dom+$path; 14 } 15 } 16 $("img").each(function(){ 17 $path = nm_reg_test_url($(this).attr("src")); 18 imgurls.push($path); 19 }); 20 var urlsArr = imgurls.slice().sort(); 21 var urlsArrDuplicate = []; 22 for (var i = 0; i < urlsArr.length - 1; i++) { 23 if (urlsArr[i + 1] === urlsArr[i]) { 24 urlsArrDuplicate.push(urlsArr[i]); 25 } 26 } 27 var uniqueUrls = jQuery.uniqueSort( urlsArrDuplicate ); 28 var class_style = 'dupImg-'; 29 $("img").each(function() { 30 for (var i = 0; i < uniqueUrls.length; i++) { 31 if(uniqueUrls[i].includes(nm_reg_test_url($(this).attr("src")))){ 32 $(this).addClass(class_style+[i]); 33 } 34 $("img.dupImg-"+[i]+":not(:first)").closest('.Article-Content-Top-Image-Link').remove(); 35 //$("img.dupImg-"+[i]+":not(:first)").closest('img').remove(); // removes img in p tag 36 $("img.dupImg-"+[i]+":not(:first)").closest('.et_pb_text_inner').remove(); 37 //$("img.dupImg-"+[i]+":not(:first)").closest('p').remove(); 38 39 } 40 }); 41});
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.