1(function($) { 2 // $(function(){ 3 // var scrollTop, 4 // times, 5 // startY, 6 // moveEndY, 7 // Y; 8 // $(window).bind("touchstart", function(e) { 9 // startY = e.originalEvent.changedTouches[0].pageY; 10 // }).bind("touchmove",function(e){ 11 // //$(".footer_fixed").removeClass("footer_show"); 12 // //clearInterval(times); 13 // moveEndY = e.originalEvent.changedTouches[0].pageY, //è¨éææç§»åçå¼ 14 // Y = moveEndY - startY; 15 // }).bind("touchend",function(){ 16 // //scrollTop = $(window).scrollTop(); 17 // //console.log(Y) 18 // if(Y > 0){//妿Y>0表示å䏿»¾å 19 // //showFooter(); 20 // $(".footer_fixed").addClass("footer_show"); 21 // }else{ 22 // $(".footer_fixed").removeClass("footer_show"); 23 // } 24 // }); 25 26 27 // }); 28 29 30 function NMGShareBar(properties) { 31 var the = this, 32 defaults = { 33 sideSeletor: '.share_bar', 34 bottomSeletor: '.footer_fixed', 35 titleSeletor:'.share_box' 36 }; 37 $.extend(defaults, properties); 38 NMGShareBar.defaults = defaults; 39 $(function() { 40 NMGShareBar.bind(); 41 }); 42 }; 43 44 NMGShareBar.defaults = null; 45 46 NMGShareBar.openPopup = function(url) { 47 var popupWidth = 550, 48 popupHeight = 450, 49 iTop = (window.screen.availHeight - 30 - popupHeight) / 2, 50 iLeft = (window.screen.availWidth - 10 - popupWidth) / 2; 51 window.open(url, '_blank', 'toolbar=0,personalbar=0,resizable,scrollbars,status,width=' + popupWidth + ',height=' + popupHeight + ',top=' + iTop + ',left=' + iLeft); 52 } 53 54 // NMGShareBar.bind = function() { 55 // var sideItems = $(NMGShareBar.defaults.sideSeletor).find('li').not('.num'), 56 // bottomItems = $(NMGShareBar.defaults.bottomSeletor).find('li').not('.num'); 57 // //titleItems = $(NMGShareBar.defaults.titleSeletor).find('li'); 58 // // console.log($(NMGShareBar.defaults.titleSeletor).html()); 59 // if (sideItems.length) { 60 // //console.log(sideItems); 61 // sideItems.each(function(i) { 62 // var the = $(this).find('a'); 63 // NMGShareBar.dataAttrs(the, NMGShareBar.defaults.eventTracking.desktop[i]); 64 // NMGShareBar.bindClickEvent(the, NMGShareBar.defaults.socialList.desktop[i]); 65 // }); 66 // } 67 // if (bottomItems.length) { 68 // //console.log(bottomItems); 69 // bottomItems.each(function(i) { 70 // var the = $(this); 71 // NMGShareBar.dataAttrs(the, NMGShareBar.defaults.eventTracking.mobile[i]); 72 // NMGShareBar.bindClickEvent(the, NMGShareBar.defaults.socialList.mobile[i]); 73 // }); 74 // } 75 // // if (titleItems.length) { 76 // // //console.log(titleItems); 77 // // titleItems.each(function(i) { 78 // // var the = $(this); 79 // // NMGShareBar.dataAttrs(the, NMGShareBar.defaults.eventTracking.mobile[i]); 80 // // NMGShareBar.bindClickEvent(the, NMGShareBar.defaults.socialList.mobile[i]); 81 // // }); 82 // // } 83 // }; 84 85 // NMGShareBar.dataAttrs = function(obj, attrList) { 86 // $.each(attrList, function(d, v) { 87 // if (d == 'label') { 88 // obj.attr('data-' + d, v + '_' + NMGShareBar.defaults.currPost.title); 89 // } else { 90 // obj.attr('data-' + d, v); 91 // } 92 // }); 93 // } 94 95 // NMGShareBar.bindClickEvent = function(obj, socialList) { 96 // obj.off('click').on('click', function() { 97 // var url = socialList.link; 98 // for (var n in NMGShareBar.defaults.currPost) { 99 // var reg = new RegExp("\\[" + n + "\\]", "gmi"); 100 // var str = NMGShareBar.defaults.currPost[n] 101 // if (n == 'url') { 102 // str += socialList.utm; 103 // str = encodeURIComponent(str); 104 // } 105 // if (n == 'title') { 106 // str = encodeURIComponent(str); 107 // } 108 // if (n == 'ad') { 109 // str = encodeURIComponent(str); 110 // } 111 // url = url.replace(reg, str); 112 // } 113 // NMGShareBar.openPopup(url); 114 // if (typeof _gaq != 'undefined') { 115 // _gaq.push(['_trackEvent', obj.attr('data-category'), obj.attr('data-action'), obj.attr('data-label')]); 116 // return; 117 // } 118 // if (typeof __gaTracker != 'undefined') { 119 // __gaTracker('send', 'event', obj.attr('data-category'), obj.attr('data-action'), obj.attr('data-label')); 120 // return; 121 // } 122 // }); 123 // } 124 125 if (typeof (window.NMGShareBar) == 'undefined') { 126 window.NMGShareBar = NMGShareBar; 127 new NMGShareBar(NMGShareBarInit); 128 } 129 130}(jQuery));
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.