1/*-------------------- functions --------------------*/ 2 3let my_url = location.href; 4 5jQuery(function ($) { 6 7 8 for (let i = 0; i < label_on.length; i++) { 9 let label = label_on[i] + ''; 10 let item = label + '_items'; 11 //console.log(item); 12 13 if (item in labelitems) { 14 15 //for category and search page 16 17 console.log(my_url); 18 if ( 19 my_url.indexOf("/shop/c/c") > -1 || 20 my_url.indexOf("search.aspx") > -1 21 ) { 22 $( 23 ".list_product.side_l .list_product_each .product_thum, .goods_t_ .goods_item_ .img_ img" 24 ).each(function () { 25 let this_src = $(this).attr("src"); 26 let this_filename = this_src.split("/").pop(); 27 let this_code = this_filename.split(".")[0]; 28 if (this_code != undefined) { 29 if (labelitems[item].includes(this_code)) { 30 $(this).after( 31 '<div class="' + label + ' label_fair_' + label_data[label].color + ' ' + label_data[label].type + '_cat">' + label_data[label].title + '</div>' 32 ); 33 } 34 } 35 }); 36 } 37 38 //for item page 39 if (my_url.indexOf("/shop/g/g") > -1) { 40 if (!$("body").hasClass("sp")) { 41 let this_obj = $(".thumbs_each.current img"); 42 let this_src = this_obj.attr("src"); 43 let this_filename = this_src.split("/").pop(); 44 let this_code = this_filename.split(".")[0]; 45 if (this_code != undefined) { 46 if (labelitems[item].includes(this_code)) { 47 this_obj.after( 48 '<div class="' + label + ' label_fair_' + label_data[label].color + ' ' + label_data[label].type + '_detail">' + label_data[label].title + '</div>' 49 ); 50 } 51 } 52 } else { 53 let this_obj = $("#gallery ul li:first-child img"); 54 let this_src = this_obj.attr("src"); 55 let this_filename = this_src.split("/").pop(); 56 let this_code = this_filename.split(".")[0]; 57 if (this_code != undefined) { 58 if (labelitems[item].includes(this_code)) { 59 this_obj.after( 60 '<div class="' + label + ' label_fair_' + label_data[label].color + ' ' + label_data[label].type + '_detail">' + label_data[label].title + '</div>' 61 ); 62 } 63 } 64 } 65 } 66 67 //for event page 68 if (my_url.indexOf("/shop/e/e") > -1) { 69 $( 70 ".StyleC_Item_ .img_ img, .StyleD_Item_ .img_ img, .goods_item_ .img_ img" 71 ).each(function () { 72 let this_src = $(this).attr("src"); 73 let this_filename = this_src.split("/").pop(); 74 let this_code = this_filename.split(".")[0]; 75 if (this_code != undefined) { 76 if (labelitems[item].includes(this_code)) { 77 $(this).after( 78 '<div class="' + label + ' label_fair_' + label_data[label].color + ' ' + label_data[label].type + '_event">' + label_data[label].title + '</div>' 79 ); 80 } 81 } 82 }); 83 } 84 85 } 86 87 88 } 89});
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.