PageSourceSearch

https://www.workercn.cn/resources/js/qzlist.js?260305

js workercn.cn collected 2026-10-02 04:40:36 UTC 5,255 bytes, 180 lines download raw bytes

1var barFlag="zgw_navi_Flag_for_seven";
2function setCookie_log (c_name,value,domain){
3    var exdate = new Date(), expiredays = 365;
4    exdate.setDate(exdate.getDate() + expiredays);
5    //判断是否需要跨域存储
6    if (domain) {
7        document.cookie = c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())+";path=/;domain=workercn.cn";
8    } else {
9        document.cookie = c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString())+";path=/";
10    }
11  }
12
13  function getCookie_log(name){
14    if (document.cookie.length>0){
15      var start=document.cookie.indexOf(name + "=");
16      if(start != -1){
17        start = start + name.length + 1;
18        var end = document.cookie.indexOf(";",start);
19        if (end == -1){
20          end = document.cookie.length;
21        }
22        return unescape(document.cookie.substring(start,end));
23      }
24    }
25  }
26
27function loadSort() {
28	var targetData=getCookie_log(barFlag);
29
30	//var data=localStorage.wy_sortdata;
31	if (!targetData) {
32		targetData=[];
33	} else {
34	//targetData is defined in the model:['a','b','c']
35		targetData=JSON.parse(targetData);
36	}
37	return targetData;
38}
39
40function saveSort(s) {
41	//localStorage.wy_sortdata=JSON.stringify(s);
42	setCookie_log(barFlag,JSON.stringify(s),true);
43}
44
45function sortTemp(s, t) {
46	var i, j, item, jtem;
47	for (i=s.length-1;i>=0;i--){
48		for (j=0;j<t.length;j++) {
49			if ($(t[j]).text()==s[i]) {
50				jtem=t[j];
51				t.splice(j,1);
52				t.unshift(jtem);
53				break;
54			}
55		}
56	}
57}
58
59function generateNav(t) {
60	$(".nav ul").html("");
61	$("#gridDemo").html("");
62	$("#navpanel ul").html("");
63	for (var i=0;i<t.length;i++) {
64		$(".nav ul").append(t[i]);
65		$("#gridDemo").append("<li><div>"+$(t[i]).text()+"</div></li>");
66		$("#navpanel ul").append("<li><div>"+$(t[i]).html()+"</div></li>");
67	}
68}
69
70var ww = $(window).width(), savedSort, tempSort = [], defaultSort = [], rightTop = $("#rightholder").position().top;
71if (ww<=750) {
72	//$("#mycarousel li").attr("class", "");
73	//$("#mycarousel").jcarousel({auto:5,hasControl:true,autosize:true,buttonPrevHTML:null,buttonNextHTML:null});
74	savedSort=loadSort();
75	$(".nav li:not(#dropdown)").each(function(){
76		tempSort.push(this);
77		defaultSort.push(this);
78	});
79	sortTemp(savedSort, tempSort);
80	generateNav(tempSort);
81	var el = document.getElementById("gridDemo"),
82			sortable = Sortable.create(el);
83	$(".sort").click(function(){
84		$('#sortpanel').show();
85		$('html,body').css('overflow','hidden');
86	});
87	$('.back').click(function(){
88		$('.sortpanel').hide();
89		$('html,body').css('overflow','initial');
90	});
91	$(".save").click(function(){
92		savedSort=[];
93		$("#gridDemo div").each(function(){
94			savedSort.push($(this).text());
95		});
96		sortTemp(savedSort, tempSort);
97		generateNav(tempSort);
98		saveSort(savedSort);
99		$(".back").trigger("click");
100	});
101	$(".reset").click(function(){
102		tempSort=[].concat(defaultSort);
103		generateNav(tempSort);
104		localStorage.wy_sortdata="";
105		$(".back").trigger("click");
106	});
107	$(".navigate").click(function(){
108		$("#navpanel").show();
109	});
110	/**/
111	var hammer = new Hammer($(".left .imgtxt1")[0]);
112	hammer.on('swipeleft', function () {
113		var $next = $("#nav li.selected").next();
114		if ($next.length>0)
115			$next.children("a")[0].click();
116	});
117	hammer.on('swiperight', function () {
118		var $next = $("#nav li.selected").prev();
119		if ($next.length>0)
120			$next.children("a")[0].click();
121	}); 
122} else {
123	$("#dropdown").click(function(){
124		$(this).toggleClass("down");
125	});
126	$(window).scroll(function () {
127		var st=$(document).scrollTop(),
128			wh=$(window).height(),
129			rh=$("#rightholder").height(),
130			ft=$(".foot-03").offset().top;
131		if (st<=rightTop+rh-wh) {
132			$("#rightholder").css({position:"absolute",top:rightTop,bottom:"auto"});
133			$(".yqljx").css({position:"absolute",top:rightTop,bottom:"auto"});
134		} else {
135			if($(".yqljx").html()==undefined){
136				$("#rightholder").css({position:"fixed",top:"auto",bottom:0});
137			} else {
138				if ($("#yqlj_anh").html()==undefined) {
139					$("#rightholder").css({ position: "fixed", top: "auto", bottom: 120 })
140					$(".yqljx").css({position:"fixed",top:"auto",bottom:0});
141				} else {
142					$("#rightholder").css({ position: "fixed", top: "auto", bottom: 150 });
143					$(".yqljx").css({position:"fixed",top:"auto",bottom:0});
144				}
145			}
146		}
147	});
148
149	//acftu
150  /*
151	var qzld=null;
152	$(".leader,.ldlist").hover(function(){
153		window.clearTimeout(qzld);
154		if ($(".ldlist").css("display") == "none") {
155			$(".ldlist").css({ left: $(".leader").offset().left - $(".ldlist").outerWidth() + $(".leader").outerWidth(), top: $(".leader").offset().top + $(".leader").outerHeight() }).slideDown(200);
156			$(".leader h2").addClass("down");
157		}
158	},function(){
159		qzld=window.setTimeout(function(){
160			$(".ldlist").slideUp(200);
161			$(".leader h2").removeClass("down");
162		},300)
163	});*/
164
165	//jiaodong
166	var yqlj=null;
167	$(".yqlj,.yqljx").hover(function(){
168		window.clearTimeout(yqlj);
169		if ($(".yqljx").css("display") == "none") {
170			$(".yqljx").css({ left: $(".yqlj").offset().left - $(".yqljx").outerWidth() + $(".yqlj").outerWidth() }).slideDown(200);
171			$(".yqlj h2").addClass("down");
172		}
173	},function(){
174		yqlj=window.setTimeout(function(){
175			$(".yqljx").slideUp(200);
176			$(".yqlj h2").removeClass("down");
177		},300)
178	});
179
180}

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.