PageSourceSearch

https://www.chinagpstracker.cc/static/js/themes.js?v=11790955211

js chinagpstracker.cc collected 2026-10-02 15:33:51 UTC 12,323 bytes, 324 lines download raw bytes

1// JavaScript Document
2//前端显示方式(0:自适应 1:窄屏 2:宽屏)
3
4// $.fn.webDisplay=function(type){
5// 	if(type==0){
6// 		if($(window).width()>=1250){$('body').addClass('w_1200');}
7// 		$(window).resize(function(){
8// 			if($(window).width()>=1250){
9// 				$('body').addClass('w_1200');
10// 			}else{
11// 				$('body').removeClass('w_1200');
12// 			}
13// 		});
14// 	}else if(type==2){
15// 		$('body').addClass('w_1200');
16// 	}
17// }
18
19$.fn.webDisplay=function(type){
20	if(type==0){
21		if($(window).width()>=1600){$('body').addClass('w_1600');}
22		if(1600>$(window).width() && $(window).width()>=1250){$('body').addClass('w_1200');}
23		$(window).resize(function(){
24			if(1600>$(window).width()  && $(window).width()>=1250){
25				$('body').addClass('w_1200');
26				$('body').removeClass('w_1600');
27			}else if($(window).width()>=1600){
28				$('body').addClass('w_1600');
29				$('body').removeClass('w_1200');
30			}else if($(window).width()<1250 ){
31				$('body').removeClass('w_1200');
32				$('body').removeClass('w_1600');
33				// alert(1)
34			}
35		});
36	}else if(type==2){
37		$('body').addClass('w_1200');
38	}
39}
40
41function nav(father,son,bor,del){	//判断导航栏,如果太长自动隐藏  参数:父元素,子元素,border的大小,是否延迟
42	var delay = del ? del : 1;
43	var func = function(){
44		var chd = $(son);
45		var nav = $(father).width();
46		var chd_width = 0;
47		var border = bor ? bor : 0;
48		chd.show();
49		chd.each(function(){
50			var w = $(this).width();
51			var pl = $(this).css("padding-left");
52			var	pr = $(this).css("padding-right");
53			var ml = $(this).css("margin-left");
54			var mr = $(this).css("margin-right");
55			var width = parseInt(w) + parseInt(pl) + parseInt(pr) + parseInt(ml) + parseInt(mr) + border;
56			chd_width +=width;
57			if(chd_width>nav){
58				$(this).hide();
59			}else{
60				$(this).show();
61			}
62		});
63	}
64	func();
65	$(window).resize(function(){
66		if(delay){
67			setTimeout(func, 210);
68		}else{
69			func();
70		}
71	});
72}
73
74function showthis(o1,o2,i,c){
75	$(o1).eq(i).addClass(c).siblings(o1).removeClass(c);
76	$(o2).eq(i).show().siblings(o2).hide();
77}
78
79function SetEditorContents(ContentsId){		//PC版编辑器设置
80	var _this = $(ContentsId);
81	var _img = _this.find("img");
82	_img.each(function(){
83		var _float = $(this).css("float");
84		if(_float=='left'){
85			$(this).css("margin-right","20px");
86		}else if(_float=='right'){
87			$(this).css("margin-left","20px");
88		}
89    });
90	_this.find('td').css('word-break', 'normal');
91}
92$(function(){SetEditorContents("#global_editor_contents");})
93
94function product_gallery(){// 产品详细页放大镜/static/static/inc/products/gallery.php使用的函数
95	$('#small_img .small_img_list .bd , .left_small_img').on('click', 'span', function(){
96		var img=$(this).attr('pic');
97		var big_img=$(this).attr('big');
98		$('#bigimg_src').attr('src', img).parent().attr('href', big_img);
99		$(this).addClass('on').siblings('span').removeClass('on');
100		$('#zoom').css('width', 'auto');
101		var_j(document).a('domready', MagicZoom.refresh);
102		var_j(document).a('mousemove', MagicZoom.z1);
103	});
104}
105
106function case_gallery(){// 案例详细页/static/static/inc/case/gallery.php使用的函数
107	$('#small_img .small_img_list .bd').delegate('span', 'click', function(){
108		var img=$(this).attr('pic');
109		var big_img=$(this).attr('big');
110		$('#bigimg_src').attr('src', img).parent().attr('href', big_img);
111		$(this).addClass('on').siblings('span').removeClass('on');
112	});
113}
114
115$(function(){
116	/*社交媒体*/
117	$("#chat_window .chat_box.is_respon .chat_box_menu .more").click(function(){
118		$("#chat_window .chat_box .box").toggleClass("show");
119	});
120	$("#chat_window .chat_box .box .chat_close").click(function(){
121		$("#chat_window .chat_box .box").removeClass("show");
122	});
123	$(window).scroll(function(){
124		if($(window).scrollTop()>0){
125			$('#go_top').addClass("show");
126		}else{
127			$('#go_top').removeClass("show");
128		}
129	});
130	$('#go_top').click(function(){$("html, body").animate({"scrollTop":0}, 700);});
131	
132	//添加包裹class;处理响应式时table宽度超出内容区的问题
133	$("#global_editor_contents table").wrap("<div class='editor_table_wrap'></div>");
134	
135	$('.dark').css({opacity:"0.5"});//透明公共样式
136	$('#newsletter,#pop_newsletter_form').submit(function(){//订阅ok
137		if(global_obj.check_form($(this).find('*[notnull]'), $(this).find('*[format]'))){return false;}
138		$(this).find('input[type=submit]').attr('disabled', 'disabled');
139		$.post('?do_action=action.newsletter', $(this).serialize(), function(data){
140			if(data.status==1){
141				global_obj.win_alert(lang_obj.global.add_newsletter, function(){$('#newsletter input[name=Email],#pop_newsletter_form input[name=Email]').val('');});
142				if($("#newsletter_pop").length){
143					$("#newsletter_pop,.newsletter_mask").removeClass("show");
144				}
145			}else{
146				global_obj.win_alert('"'+data.msg+'" '+lang_obj.global.email_exists,'','sorry');
147			}
148		}, 'json');
149		$(this).find('input[type=submit]').removeAttr('disabled');
150		return false;
151	});
152	$("#footer_feedback").animate({bottom:-270},function(){
153		$("#footer_feedback").animate({bottom:-290},function(){
154			$("#footer_feedback").animate({bottom:-270});
155		});
156	});
157	$("#footer_feedback .title .close").click(function(){$("#footer_feedback").remove();});
158
159	$('#footer_feedback .title').click(function(){//底部留言js
160		if($(this).parent('#footer_feedback').attr('class')=='up'){
161			$(this).parent('#footer_feedback').stop(false,true).animate({bottom:"0px"},'fast');
162			$(this).parent('#footer_feedback').removeClass('up');
163		}else{
164			$(this).parent('#footer_feedback').stop(false,true).animate({bottom:"-270px"},'fast');
165			$(this).parent('#footer_feedback').addClass('up');
166		}
167	});
168	$('#lib_feedback_form form[name=feedback], .ueeshop_responsive_feedback form[name=feedback],#lib_feedback_form form[name=feedback], .ueeshop_responsive_article_feedback form[name=feedback]').submit(function(){//在线留言、单页留言提交处理ok
169		if(global_obj.check_form($(this).find('*[notnull]'), $(this).find('*[format]'))){return false;}
170		var e=$(this).find('input[name=Email]');
171		var float=$(this).find('input[name=float]');
172		e.removeAttr('style');
173		if(e.length!=0){
174			if(e.val()!='' && (/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(e.val())===false)){
175				e.css('border', '1px solid red');
176				e.focus();
177				global_obj.win_alert(lang_obj.format.email,'','sorry');
178				return false;
179			}
180		}
181		$(this).find('input:submit').attr('disabled', 'disabled');
182
183		$.post('?do_action=action.submit_feedback', $(this).serialize(), function(data){
184			$('#lib_feedback_form form[name=feedback] input:submit, .ueeshop_responsive_feedback form[name=feedback] input:submit').removeAttr('disabled');
185			global_obj.win_alert(data.msg);
186			if(data.status==1){
187				$('#lib_feedback_form input[type=text]').val('');
188				$('#lib_feedback_form textarea').val('');
189				$('#lib_feedback_form .rows span img').click();
190			}else if(data.status==-1){
191				$('#lib_feedback_form input[name=VCode]').css('border', '1px solid red').val('').focus().siblings('img').click();
192			}else if(data.status==-2){
193
194			}
195		},'json');
196		return false;
197	});
198
199	$('#lib_down_list a, .ueeshop_responsive_download_list a').click(function(){
200		var id = $(this).attr('l');
201		if ($(this).hasClass('pwd')){
202			global_obj.win_alert('', function (){
203				var pwd = $('.win_alert input[name=Password]').val();
204				$.get('/', {do_action:'action.download_pwd', DId:id, pwd:pwd}, function (data){
205					if (data.ret==1){
206						$('.win_alert .error_tips').hide(0).html('');
207						if (data.msg.url==0){//内链
208							$('.win_alert').remove();
209							global_obj.div_mask(1);
210							window.location.href = '/?do_action=action.download'+'&DId='+id+'&pwd='+pwd;
211						}else{//外链
212							window.location.href = data.msg.url;
213						}
214					}else{
215						$('.win_alert .error_tips').show(0).html(data.msg[0]);
216					}
217				}, 'json');
218			}, 'password');
219		}else{
220			if(!$(this).is('[target]')){
221				window.location = '/?do_action=action.download'+'&DId='+id;
222			}
223		}
224	});//下载
225	//产品附件下载
226	$('.pro_right .down_list a,.ueeshop_responsive_products_detail .down_list a').click(function(){
227		var proid = $(this).attr('ProId');
228		var path = $(this).attr('path');
229		if ($(this).hasClass('pwd')){
230			global_obj.win_alert('', function (){
231				var pwd = $('.win_alert input[name=Password]').val();
232				$.get('/', {do_action:'action.products_download_pwd', Path:path, ProId:proid, pwd:pwd}, function (data){
233					if (data.ret==1){
234						$('.win_alert .error_tips').hide(0).html('');
235						$('.win_alert').remove();
236						global_obj.div_mask(1);
237						window.location.href = '/?do_action=action.products_download&Path='+path+'&ProId='+proid+'&pwd='+pwd;
238					}else{
239						$('.win_alert .error_tips').show(0).html(data.msg[0]);
240					}
241				}, 'json');
242
243			}, 'password');
244		}else{
245			window.location = '/?do_action=action.products_download&Path='+path+'&ProId='+proid;
246		}
247	});//产品附件下载 end
248
249	$(".prod_info_pdf").click(function(){$("#export_pdf").attr("src", "//pdfmyurl.com?url="+window.location.href.replace(/^http[s]?:\/\//, ""));});//PDF打印
250	$('#add_to_inquiry , .add_to_inquiry').click(function(){	//加入询盘篮
251		$.post('?do_action=action.add_inquiry', 'ProId='+$(this).attr('data'), function(data){
252			if(data.inq_type){
253				window.location.href="/inquiry.html";
254			}else{
255				if(data.is_there==-1){
256					tips = lang_obj.global.already;
257				}else{
258					tips = lang_obj.global.add_success;
259				}
260				global_obj.div_mask();
261				$('body').prepend('<div id="global_win_alert" class="responsive_win_alert"><div id="alert_top"><div id="alert_img"></div><div id="alert_tips">'+tips+'</div>'+'<div class="clear"></div></div><div id="alert_bottom"><a href="javascript:void(0);" id="alert_continue">'+lang_obj.global.continues+'</a><a href="/inquiry.html" id="alert_inquery">'+lang_obj.global.inquery+'</a><div class="clear"></div></div></div>');
262				
263				$('#alert_continue').click(function(){
264					$('#global_win_alert').remove();
265					$('#div_mask').remove();
266				});
267			}
268		},'json');
269	});
270	$('#lib_inquire_list>ul>li .info .remove a, .ueeshop_responsive_products_inquiry .remove a').click(function(){//删除询盘篮
271		var obj=$(this).parent().parent().parent();
272		$.post('?do_action=action.del_inquiry', 'ProId='+$(this).attr('data'), function(data){
273			if(data.status==1){
274				global_obj.win_alert('Successful!', function(){obj.remove();});
275			}else if(data.status==2){
276				global_obj.win_alert('Successful!', function(){location=location;});
277			}else if(data.status==-1){
278				global_obj.win_alert('Error!','','sorry');
279			}
280		},'json');
281	});
282	$('#lib_inquire_list form[name=inquiry], .ueeshop_responsive_products_inquiry form[name=inquiry]').submit(function(){//产品询盘提交处理
283		if(global_obj.check_form($(this).find('*[notnull]'))){return false;}
284		var e=$(this).find('input[name=Email]');
285		if(e.size()){
286			e.removeAttr('style');
287			if(e.val()!='' && (/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(e.val())===false)){
288				e.css('border', '1px solid red');
289				e.focus();
290				global_obj.win_alert(lang_obj.format.email,'','sorry');
291				return false;
292			}
293		}
294		$(this).find('input:submit').attr('disabled', 'disabled');
295
296		$.post('?do_action=action.submit_inquiry', $(this).serialize(), function(data){
297			if(data.status==1){
298				//global_obj.win_alert(data.msg, function(){window.location.href='/';});
299				window.location.href='/inquiry_success.html';
300			}else{
301				global_obj.win_alert(data.msg,'','sorry');
302			}
303		},'json');
304
305		$(this).find('input:submit').removeAttr('disabled');
306		return false;
307	});
308	$('#lib_review_form form[name=review], .ueeshop_responsive_products_detail_review form[name=review]').submit(function(){//评论
309		if(global_obj.check_form($(this).find('*[notnull]'), $(this).find('*[format]'))){return false;}
310		$(this).find('input:submit').removeAttr('disabled');
311		$.post('?do_action=action.submit_review', $(this).serialize(), function(data){
312			if(data.status==1){
313				global_obj.win_alert(data.msg, function(){window.location.href=window.location.href;});
314			}else{
315				global_obj.win_alert(data.msg,'','sorry');
316			}
317		},'json');
318		return false;
319	});
320	$(".email_copy").bind('copy', function(){
321		$.post('?do_action=action.email_copy_log', {email:$(this).text(),url:location.href});
322		return false;
323	});
324});

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.