1 2function log(str) { 3 $('#result').text($('#result').text() + " " + str); 4}; 5 6function inVokeData() { 7 if (typeof wxSharedData != 'undefined') { 8 log("called invoke .."); 9 try { 10 invokeCSharpAction(wxSharedData); 11 } catch (err) { 12 log(err); 13 } 14 15 } else { 16 log("wxSharedData undefined"); 17 } 18 }; 19 20if (typeof invokeCSharpAction === 'undefined') { 21 log("Created a new function"); 22 function invokeCSharpAction(data) 23 { 24 if (typeof window.webkit !== 'undefined'){ 25 window.webkit.messageHandlers.invokeAction.postMessage(data); 26 }else{ 27 if(typeof jsBridge !== 'undefined'){ 28 jsBridge.invokeAction(data); 29 } 30 } 31 } 32 inVokeData(); 33 34} else { 35 console.log("call inVokeData"); 36 inVokeData(); 37 38} 39 40wx.miniProgram.getEnv(function (res) { 41 if (res.miniprogram) { 42 //in miniprogram,clean all links 43 $("a[href]") 44 .each(function () { 45 var allGoodSites = this.href.includes("58landlord.com") 46 || this.href.includes("58home.space") 47 || this.href.includes("58space.ca") 48 || this.href.includes("58home.ca") 49 || this.href.includes("58home.shop") 50 || this.href.includes("58fd.net") 51 || this.href.includes("58fd.ca") 52 || this.href.includes("mp.weixin.qq.com") 53 || this.href.includes("vivalifestyle.ca") 54 || this.href.includes("58homedirect.com") 55 ; 56 57 // 58 59 if (!allGoodSites && this.href.includes("http")) 60 this.href = ""; 61 }); 62 63 //iframe 64 //$("iframe") 65 // .each(function () { 66 // var src = $(this).attr('src'); 67 // if (!src.includes("www.58landlord.com") && src.includes("http")) 68 // $(this).attr('src', ""); 69 // }); 70 71 } 72})
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.