PageSourceSearch

https://liumx10.github.io/js/share.js?v=0.0.0

js liumx10.github.io collected 2026-10-03 09:31:29 UTC 2,047 bytes, 58 lines download raw bytes

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