PageSourceSearch

https://statics.haiwainet.cn/tpl2021/2021-03-25/js/poster.js

js haiwainet.cn collected 2026-09-24 19:38:09 UTC 3,170 bytes, 88 lines download raw bytes

1$(document).ready(function(){
2  //下载海报按钮
3  var image=$("#poster .posterImg >img");
4  var posterUrl=image[0].src;
5  var posterH5Url=posterUrl.replace('http://haikenews.static.haiwainet.cn', '');
6  // posterH5Url="https://m.haiwainet.cn/middle/index/posterweixin/?id="+sensorsConData["event"].content_id+"&img="+posterH5Url;
7  posterH5Url="https://m.haiwainet.cn/middle/index/posterweixin?img="+posterH5Url;
8
9
10  //打开关闭海报显示
11  $(".posterOpen").click(function(){
12    $("#poster").fadeToggle("fast","linear");
13    $(document.body).css({
14      "overflow-x":"hidden",
15      "overflow-y":"hidden"
16    });
17  });
18  $("#poster").click(function(event){
19    if( $(event.target)[0]===this) {
20      $("#poster").fadeToggle("fast","linear");
21      $(document.body).css({
22        "overflow-x":"auto",
23        "overflow-y":"auto"
24      });
25    }
26  })
27  //分享到新浪微博
28  var ShareTip = function(){}
29  ShareTip.prototype.sharetosina=function(title,url,imgUrl)
30  {
31    var sharesinastring='https://service.weibo.com/share/share.php?title='+title+'&pic='+imgUrl+'&url='+url+'&content=utf-8&sourceUrl='+url;
32//            var sharesinastring='http://v.t.sina.com.cn/share/share.php?&appkey='+appkey+'&title='+title+'&url='+url+'&content=utf-8&sourceUrl='+url+'&pic='picurl;
33    window.open(sharesinastring,'resizable=no');
34  }
35
36  $('.weibo').on('click', function () {
37    var shareTitle = $('.showpage h1').text();
38    var shareContent = $("meta[name='description']").text();
39    var shareUrl = window.location.href;
40    var share1 = new ShareTip();
41    if($(this).has('hb')){
42      console.log(1111)
43      console.log(posterUrl)
44      share1.sharetosina(shareTitle + "  " + shareContent,shareUrl,posterUrl);
45    }else{
46      share1.sharetosina(shareTitle + "  " + shareContent,shareUrl,$('.contentMain img'));
47    }
48
49  })
50  // 分享到微信
51  $('#poster span.weixin,#poster span.weixinFridend').click(function () {
52
53    if($('.wx-box').length){
54
55    }else{
56      // console.log(sensorsConData);
57      $('#poster .posterblock .posterButton').append('<div class="wx-box" ><div class="weixintit">分享到微信</div><div id="wxCode"></div><p>1、使用“扫一扫”,将海报下载到手机相册</p><p>2、将下载的海报分享给微信好友或朋友圈</p><div class="wx-box-close"></div></div>');
58      //生成二维码
59
60      //   var posterH5Url="http://m.haiwainet.cn/middle/index/posterweixin/?id=31737188&img=/poster_v6/2020/0308/52a77ead-0951-4d03-9d72-e62a77700a19.jpg"
61
62      console.log(posterH5Url);
63      $("#wxCode").qrcode({
64        render: 'canvas',
65        width: 116,
66        height: 116,
67        text: posterH5Url //任意内容
68      });
69      $('.wx-box-close').on('click', function () {
70        $('.wx-box').hide();
71      })
72    }
73    $('.wx-box').show();
74
75  })
76
77
78
79})
80
81function  dataURLtoBlob(dataurl) {
82  var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
83    bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
84  while(n--){
85    u8arr[n] = bstr.charCodeAt(n);
86  }
87  return new Blob([u8arr], {type:mime});
88}

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.