PageSourceSearch

https://www.quannan.gov.cn/qnxrmzfwyyh/xhtml/js/common.js

js quannan.gov.cn collected 2026-10-02 17:02:31 UTC 4,531 bytes, 133 lines download raw bytes

1$(document).ready(function() {
2    //easybtn
3    $(".easyBtn dl").hover(function(){
4        $(this).addClass('on')
5                .find("dt span").fadeIn("fast");
6        $(this).find("dd").show();
7    },function(){
8        $(this).removeClass('on')
9                .find("dt span").fadeOut("fast");
10        $(this).find("dd").hide();
11    });
12    $("#easybtn-close").click(function(){
13        $(".easyBtn").fadeOut('fast');
14    });
15    
16    //友情链接
17    var $links = $('.footer-links .hd li.hs');
18    $links.click(function(e){
19            var index = $links.index(this);
20            $(this).toggleClass("on").siblings().removeClass("on");
21            $(".footer-links .bd ul").eq(index).slideDown("fast").siblings().slideUp("fast");
22            if(!$(this).hasClass('on')){
23                $(".footer-links .bd ul").eq(index).slideUp("fast");
24            }
25            e.preventDefault();
26            e.stopPropagation();
27    })
28    $(document).click(function(){ 
29        $links.removeClass("on");
30        $(".footer-links .bd ul").slideUp("fast");
31    })
32
33
34    //浏览量
35 	var viewAjaxUrl = "/u/hit/count";
36
37				//文章页浏览量
38
39				try {
40					$.ajax({
41						url: viewAjaxUrl,
42						type: "post",
43						data: {
44							hType: 3, //类型(1、站点;2、栏目;3、稿件)
45							hId: manuscriptId //对象ID
46						},
47						success: function(data) {
48							$("#view").text(data.data); //文章页对应显示访问量地方的id
49						}
50					});
51				} catch(e) {}
52     
53    //栏目浏览量
54     if(typeof channelId != "undefined"  && typeof manuscriptId == "undefined") {
55        try{
56            $.ajax({
57                url: viewAjaxUrl,
58                type: "post",
59                data:{
60                    hType: 2, //类型(1、站点;2、栏目;3、稿件)
61                    hId: channelId //对象ID
62                }
63            }); 
64        }catch(e){}
65    } 
66
67    //点击外链询问离开
68    //截取URL域名部份
69    var getHost = function(url) {
70        var host = "null";
71        if (typeof url == "undefined" || null == url) url = window.location.href;
72        var regex = /.*\:\/\/([^\/]*).*/;
73        var match = url.match(regex);
74        if (typeof match != "undefined" && null != match) host = match[1];
75        return host;
76    };
77    //外链跳转弹框
78    _outHtml = '<div class="alert-warning"><div class="alert-delete"><span id="closets">X</span></div><div class="alert-wzsm"><P>您访问的链接即将离开\''+ $("meta[name='SiteName']").attr('content') +'网站\'是否继续?</P></div><div class="alert-footer"><span class="continue">继续访问</span><span class="fangqi">放弃</span></div></div><div class="alert-mengban"></div>', $("body").append(_outHtml);
79    
80    $(document).on('click','a',function(e){
81        if ( $(this).hasClass('selflink') ) return;
82        var o = $(this), host, ckhost;
83        var href = o.attr('href');
84        if(href && !/^(?=javascript:)/.test(href) && /^(?=http)/.test(href)) {
85            host = getHost(href);
86            ckhost = host.indexOf('gov.cn');
87        }
88        if( href && host ){
89            if( host != document.domain){
90                o.attr('target','_blank');
91                if(o.data('ask')!='1'){
92                    $(".alert-mengban").fadeIn("fast");
93                    $(".alert-warning").fadeIn("fast");
94                    $("#closets,.fangqi, .alert-mengban").click(function () {
95                        $(".alert-warning").fadeOut(300);
96                        $(".alert-mengban").fadeOut(300);
97                    }); 
98                    $(".continue").one("click", function () {
99                        $(".alert-warning").fadeOut(300);
100                        $(".alert-mengban").fadeOut(200);
101                        o.data('ask','1');
102                        o[0].click();
103                        $("#closets").click();
104                    });
105                    return false;
106                }
107            }
108        }
109    });
110
111});
112
113
114//截取网址参数
115function QueryString(qs){
116    var Ohref = location.href;
117    Ohref = Ohref.replace("?","?&").split("&");
118    var re = "";
119    for(i=1;i<Ohref.length;i++){
120        if(Ohref[i].indexOf(qs+"=")==0){
121            re=Ohref[i].replace(qs+"=","");
122        }
123    }
124    return re;
125}
126
127var _hmt = _hmt || [];
128(function() {
129  var hm = document.createElement("script");
130  hm.src = "https://hm.baidu.com/hm.js?ad507e2c90cc56d98d4d14b9d223b4a9";
131  var s = document.getElementsByTagName("script")[0]; 
132  s.parentNode.insertBefore(hm, s);
133})();

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.