PageSourceSearch

https://www.jyg.gov.cn/cms_files/filemanager/958854702/script/20224/751a1bbe206a48a0a7efd3832c9a8efa.js

js jyg.gov.cn collected 2026-10-02 17:03:31 UTC 3,639 bytes, 90 lines download raw bytes

1$(function(){
2    //分享
3    var title = "【" + $.trim(document.title) + "】";
4    var description = $.trim($('meta[name="description"]').attr('content'));
5    var portalUrl = window.location.href;
6    //生成二维码
7    function generateQRCode(rendermethod, picwidth, picheight, url) {
8        $(".qrcode").qrcode({
9            render: rendermethod, // 渲染方式有table方式(IE兼容)和canvas方式
10            width: picwidth, //宽度
11            height: picheight, //高度
12            text: utf16to8(portalUrl), //内容
13            typeNumber: -1, //计算模式
14            correctLevel: 2, //二维码纠错级别
15            background: "#ffffff", //背景颜色
16            foreground: "#000000" //二维码颜色
17
18        });
19    }
20    canvas_table = !!document.createElement('canvas').getContext ? 'canvas' : 'table';
21
22    function init() {
23        generateQRCode(canvas_table, 90, 90, window.location.href);
24    }
25    //中文编码格式转换
26    function utf16to8(str) {
27        var out, i, len, c;
28        out = "";
29        len = str.length;
30        for(i = 0; i < len; i++) {
31            c = str.charCodeAt(i);
32            if((c >= 0x0001) && (c <= 0x007F)) {
33                out += str.charAt(i);
34            } else if(c > 0x07FF) {
35                out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
36                out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
37                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
38            } else {
39                out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
40                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
41            }
42        }
43        return out;
44    }
45    init();
46
47    // $(".share-wechat").on("click", function() {
48        // $(".bg-code,.qrcode").toggle();
49    // });
50	
51	$(".share-wechat").mouseenter(function(){
52    $(".bg-code,.qrcode").show();
53  }).mouseleave(function(){
54    $(".bg-code,.qrcode").hide();
55  });
56	
57    //清空二维码
58    // $(".close-btn").on("click", function(event) {
59        // $(".bg-code,.qrcode,.close-btn").hide();
60        // event.stopPropagation();
61    // });
62
63    function showToQzone() {
64         var _desc = description;
65         var _title = title;
66         var _url = portalUrl;
67         var _shareUrl = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?';
68         _shareUrl += 'url=' + encodeURIComponent(_url);   //参数url设置分享的内容链接|默认当前页location
69         _shareUrl += '&title=' + encodeURIComponent(_title);    //参数title设置分享标题,可选参数
70         window.open(_shareUrl,'','width=700,height=680,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=1,location=yes,status=0'); 
71    }
72
73    function showToSina(title, portalUrl, desc) {
74        var _desc = desc;
75        var _t = title + " " + _desc;
76        var _url = portalUrl;
77        var _appkey = "2806082167"; //你从微薄获得的appkey
78        var _site = ''; //你的网站地址
79        var _ralateUid = "";
80        var _u = 'http://service.weibo.com/share/share.php?url=' + _url + '&appkey=' + _appkey + '&title=' + _t + '&ralateUid=' + _ralateUid + '&searchPic=false';
81        window.open(_u, '', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no');
82    }
83    
84    $('.share-qqzone').on('click', function() {
85        showToQzone(title, portalUrl, description);
86    });
87    $('.share-weibo').on('click', function() {
88        showToSina(title, portalUrl, description);
89    });
90});

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.