PageSourceSearch

https://www.ssxjd.com/js/pcjs/index.js

js ssxjd.com collected 2026-10-08 03:06:35 UTC 7,330 bytes, 243 lines download raw bytes

1var add;
2let cookie_add = getCookie('mobile_cookie_add')
3if (cookie_add) {
4	add = JSON.parse(cookie_add);
5	if(add.date) {
6		if (timestamp() - add.date > 1800) {
7			getToken();
8		}
9	}else{
10		getToken();
11	}
12} else {
13	getToken();
14}
15
16var up_url = '';
17if (document.referrer.length > 0) {
18	up_url = document.referrer;
19}
20try {
21	if (up_url.length == 0 && opener.location.href.length > 0) {
22		up_url = opener.location.href;
23	}
24} catch(e) {}
25document.cookie = "up_url=" + up_url + ";path=/";
26$(document).ready(function() {
27	$('.serch_param').click(function() {
28		let class_id = $('#class_id').val();
29		let key = $(this).data('type');
30		let val = $(this).data('value');
31		if (key == 'selected_letters') {
32			if ($(this).parent('li').attr('class') == 'active') {
33				$(this).parent('li').attr('class', '');
34			} else {
35				$(this).parent('li').attr('class', 'active');
36			}
37			val = getChecked();
38		}
39		let newUrlParam = getUrlParams(key, val);
40		let newUrl = "";
41		if (class_id == 'masanobu') {
42			newUrl = '/list?' + newUrlParam;
43		} else {
44			newUrl = '/list?classid=' + class_id + '&' + newUrlParam;
45		}
46		window.location.href = newUrl;
47	});
48	$(".hoverclick ul li").click(function() {
49		$(this).addClass('active').siblings().removeClass('active');
50		$(this).parents('.Findparent').find('.togparents .hidenlink').eq($(this).index()).addClass('active').siblings().removeClass('active')
51	});
52	$(".hoverclickx ul li").click(function() {
53		$(this).addClass('active').siblings().removeClass('active');
54		$(this).parents('.Findparentx').find('.togparentsx .hidenlinkx').eq($(this).index()).addClass('active').siblings().removeClass('active')
55	});
56	$('.product_clbart ul:nth-child(2) li').click(function() {
57		$(this).addClass('active').siblings().removeClass('active');
58		$(this).parents('.product_clbart').find('ul:nth-child(1) li').removeClass('active')
59	});
60	$('.product_clbart ul:nth-child(1) li').click(function() {
61		$(this).addClass('active');
62		$(this).parents('.product_clbart').find('ul:nth-child(2) li').removeClass('active')
63	});
64	$('.product_screen ul li').click(function() {
65		$(this).addClass('active').siblings().removeClass('active')
66	});
67	$('.screen_label span').click(function() {
68		$(this).toggleClass('active')
69	});
70	$('.product_more a').click(function() {
71		$(this).toggleClass('active');
72		$(this).parents('.product_slide').find('.product_hide').toggle()
73	});
74	$('.silver_files a').click(function() {
75		$(this).toggleClass('active')
76	});
77	$(".silver_more").click(function() {
78		$(this).hide();
79		$('.silver_pages').css('height', 'auto')
80	});
81	$('.confide_mbtns').click(function() {
82		$(this).toggleClass('active');
83		$(this).parents('.confide_more').find('.trust_fullset ul.hide').toggle()
84	});
85	$('.denglulook').click(function() {
86		$(".denglu").show()
87	});
88	$('.navleft_auto ul li').click(function() {
89		$(this).addClass('active').siblings().removeClass('active')
90	});
91	$('.Fidex_service ul li:last-child').click(function() {
92		$('body,html').animate({
93				scrollTop: 0
94			},
95			500)
96	});
97	$('.pack_ups').click(function() {
98		$(this).parents('.product_clbart').toggleClass('active');
99		$(this).html() == "展开" ? $(this).html("收起") : $(this).html("展开")
100	});
101	$(".grabble_form input").focus(function() {
102		$(this).parents('.grabble_form').addClass("active")
103	});
104	$(".grabble_form input").blur(function() {
105		$(this).parents('.grabble_form').removeClass("active")
106	});
107	$(".select_box").click(function(event) {
108		event.stopPropagation();
109		$(this).find(".option").toggle();
110		$(this).parent().siblings().find(".option").hide()
111	});
112	$(document).click(function(event) {
113		var eo = $(event.target);
114		if ($(".select_box").is(":visible") && eo.attr("class") != "option" && !eo.parent(".option").length) $('.option').hide()
115	});
116	$(".option a").click(function() {
117		var value = $(this).text();
118		var shou = $(this).attr("id");
119		$(this).parent().siblings(".select_txt").text(value);
120		document.getElementById("tbname").value = shou;
121		$("#select_value").val(value)
122	});
123	$(".colse_btns").click(function(event) {
124		$(this).parents('.Fidex_qualif').hide()
125	});
126	$(".colse_btns2").click(function(event) {
127		$(this).parents('.Fidex_qualif').hide()
128	});
129	$(".colse_btns3").click(function(event) {
130		$(this).parents('.Fidex_qualif').hide();
131		$(this).parents('.logged_Fix').hide()
132	});
133	$(".copys_fullset .btns a.bg-2").click(function(event) {
134		$(this).parents('.Fidex_qualif').hide()
135	});
136	$(".copys_fullset .btns a.bg-3").click(function(event) {
137		$(this).parents('.Fidex_qualif').hide()
138	});
139	$(window).scroll(function() {
140		var nowt = $(window).scrollTop();
141		if (nowt > 50) {
142			$('.header_top').hide()
143		} else {
144			$('.header_top').show()
145		}
146	});
147	if ($('.c_province').length || $('.c_rating').length) {
148		if ($('.c_province').attr('class').indexOf('active') == -1 || $('.c_rating').attr('class').indexOf('active') == -1) {
149			$('.product_more a').click()
150		}
151		if ($('.c_province').attr('class').indexOf('active') == -1) {
152			$('.pack_ups').click()
153		}
154	}
155});
156function getChecked() {
157	let res = "";
158	$('.jingxuanzhengxin li').each(function(i) {
159		if ($(this).attr("class") == 'active') {
160			res += $(this).children('a').text() + ',';
161		}
162	});
163	return res.substr(0, res.length - 1);
164}
165function getUrlParams(key = null, val = null) {
166	let search = window.location.search;
167	let tmparray = search.substr(1, search.length).split("&");
168	let newSearch = '';
169	let status = true;
170	if (tmparray != null) {
171		for (var i = 0; i < tmparray.length; i++) {
172			if (tmparray[i]) {
173				let reg = /[=|^==]/;
174				let set1 = tmparray[i].replace(reg, '&');
175				let tmpStr2 = set1.split('&');
176				if (tmpStr2[0] == key) {
177					if (val != '不限' && val) {
178						newSearch += tmpStr2[0] + '=' + val + '&';
179					}
180					status = false;
181				} else if (tmpStr2[0] != 'classid') {
182					newSearch += tmpStr2[0] + '=' + tmpStr2[1] + '&';
183				}
184			}
185		}
186	}
187	if (status && val && val != '不限') {
188		newSearch += key + '=' + val + '&';
189	}
190	return newSearch.substr(0, newSearch.length - 1)
191}
192function getCookie(name) {
193	var prefix = name + "="
194	var start = document.cookie.indexOf(prefix);
195	if (start == -1) {
196		return null
197	}
198	var end = document.cookie.indexOf(";", start + prefix.length);
199	if (end == -1) {
200		end = document.cookie.length
201	}
202	var value = document.cookie.substring(start + prefix.length, end);
203	return unescape(value)
204}
205function getToken() {
206	$.ajax({
207		type: "POST",
208		async: false,
209		dataType: "JSON",
210		url: "/api",
211		data: {
212			enews: "add_header"
213		},
214		success: function (data) {
215			var date = new Date();
216			date.setTime(date.getTime() + (30 * 60 * 1000));
217			document.cookie = "mobile_cookie_add=" + JSON.stringify(data) + ";expires=" + date.toGMTString() + ";path=/";
218			add = data
219		}
220	})
221}
222function timestamp(){
223	return Math.round(new Date().getTime()/1000);
224}
225function isMobile() {
226    var mobile_flag = true;
227    var system = {
228        win: false,
229        mac: false,
230        xll: false,
231        ipad: false
232    };
233    //检测平台
234    var p = navigator.platform;
235    system.win = p.indexOf("Win") == 0;
236    system.mac = p.indexOf("Mac") == 0;
237    system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
238    system.ipad = (navigator.userAgent.match(/iPad/i) != null) ? true : false;
239    if (system.win || system.mac || system.xll || system.ipad) {
240        mobile_flag = false;
241    }
242    return mobile_flag
243}

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.