1function openShare(type, options) { 2 var defaults = { 3 url: "http://ename.com", 4 title: "", 5 pics: "", 6 summary: "", 7 desc: "", 8 }; 9 var options = $.extend(defaults, options); 10 11 var shareURL = { 12 sinaminiblog: "https://service.weibo.com/share/share.php?appkey=583395093", 13 qzone: "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?appkey=583395093" 14 }; 15 if (shareURL[type]) { 16 var openURL = shareURL[type] 17 for (i in options) { 18 if (!/content|target/.test(i) && typeof options[i] != "function") { 19 openURL += "&" + i + "=" + encodeURIComponent(options[i]); 20 } 21 }; 22 window.open(openURL, "", "height=600,width=800,top=100,left=100,screenX=100,screenY=100,scrollbars=yes,resizable=yes") 23 24 } else if (type == "weixin") { 25 if ($("#newBsWXBox").length > 0) { 26 $("#newBsWXBox").show(); 27 } else { 28 var newBsWXBox = $('<div id="newBsWXBox"></div>'); 29 var newBsClose = $('<div id="newBsClose">X</div>'); 30 var newBsImage = $('<div id="newBsImage"></div>'); 31 32 newBsWXBox.append(newBsClose); 33 newBsWXBox.append('<div class="bsTop" style="width: 100%;height: 36px;line-height: 36px;border-bottom: 1px solid #e8e8e8;color: #666;background: #f2f2f2;"><span style="margin-left:15px;">å享å°</span><span class="bsPlatName">微信</span></div>'); 34 newBsWXBox.append(newBsImage); 35 newBsWXBox.css({ 36 "display": "block", 37 "height": "290px", 38 "width": "260px", 39 "margin-left": "-130px", 40 "margin-top": "-145px", 41 "font-size": "12px", 42 "background": "#fff", 43 "border": "6px solid #666", 44 "border-radius": "5px", 45 "-moz-border-radius": "5px", 46 "-webkit-border-radius": "5px", 47 "position": "fixed", 48 "z-index": "100000000", 49 "left": "50%", 50 "top": "50%", 51 }) 52 newBsClose.css({ 53 "cursor": "pointer", 54 "position": "absolute", 55 "z-index": "10000000", 56 "color": "#666", 57 "font-weight": "bold", 58 "font-family": "Helvetica,Arial", 59 "font-size": "14px", 60 "line-height": "20px", 61 "top": "8px", 62 "right": "20px", 63 }) 64 newBsImage.css({ 65 "display": "block", 66 "height": "220px", 67 "width": "220px", 68 "margin": "20px", 69 }) 70 71 newBsClose.click(function () { 72 $("#newBsWXBox").hide(); 73 }) 74 // $('body').on('click.newBsWXBox', function (e) { 75 // if ($(e.target).parents('#newBsWXBox').length === 0 && $(e.target).parents('[share-type="weixin"]').length === 0) { 76 // $("#newBsWXBox").hide(); 77 // }; 78 // }); 79 80 requestURL = "http://bshare.optimix.cn/barCode?site=weixin"; 81 for (var i in options) { 82 if (!/content|target/.test(i) && typeof options[i] != "function") { 83 (requestURL += "&" + i + "=" + encodeURIComponent(options[i])) 84 } 85 } 86 newBsImage.append('<img style="width:100%;height:100%;" src="' + requestURL + '" />'); 87 88 $("body").append(newBsWXBox) 89 } 90 } 91}
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.