1(function($){ 2 3 // article-share 4 $('body').on('click', function(){ 5 $('.article-share-box.on').removeClass('on'); 6 }).on('click', '.article-share-link', function(e){ 7 e.stopPropagation(); 8 9 var $this = $(this), 10 url = $this.attr('data-url'), 11 qrcode_img = $this.attr('data-qrcode'), 12 encodedUrl = encodeURIComponent(url), 13 id = 'article-share-box-' + $this.attr('data-id'), 14 title = document.title, 15 offset = $this.offset(); 16 17 if ($('#' + id).length){ 18 var box = $('#' + id); 19 20 if (box.hasClass('on')){ 21 box.removeClass('on'); 22 return; 23 } 24 } else { 25 var html = [ 26 '<div id="' + id + '" class="article-share-box">', 27 '<input class="article-share-input" value="' + url + '">', 28 '<div class="article-share-links">', 29 '<a href="//twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>', 30 '<a href="//www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>', 31 '<a href="//service.weibo.com/share/share.php?title=' + title + '&url=' + encodedUrl + '&searchPic=true&style=number' + '" class="article-share-weibo" target="_blank" title="Weibo"></a>', 32 '<a href="' + qrcode_img + '" class="article-share-qrcode" target="_blank" title="QR code"></a>', 33 '<div class="qrcode"><img src=' + qrcode_img + '></div>', 34 '</div>', 35 '</div>' 36 ].join(''); 37 38 var box = $(html); 39 40 $('body').append(box); 41 } 42 43 $('.article-share-box.on').hide(); 44 45 box.css({ 46 top: offset.top + 25, 47 left: offset.left 48 }).addClass('on'); 49 }).on('click', '.article-share-box', function(e){ 50 e.stopPropagation(); 51 }).on('click', '.article-share-box-input', function(){ 52 $(this).select(); 53 }).on('click', '.article-share-box-link', function(e){ 54 e.preventDefault(); 55 e.stopPropagation(); 56 57 window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450'); 58 }); 59 60})(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.