PageSourceSearch

https://www.china-led.net/file/script/page.js?1791097405

js china-led.net collected 2026-10-04 07:03:52 UTC 7,449 bytes, 139 lines download raw bytes

1/*
2	[DESTOON B2B System] Copyright (c) 2008-2018 www.destoon.com
3	This is NOT a freeware, use is subject to license.txt
4*/
5function Print(i) {if(isIE) {window.print();} else {var i = i ? i : 'content'; var w = window.open('','',''); w.opener = null; w.document.write('<div style="width:630px;">'+Dd(i).innerHTML+'</div>'); w.window.print();}}
6function addFav(t) {document.write('<a href="'+window.location.href+'" title="'+document.title.replace(/<|>|'|"|&/g, '')+'" rel="sidebar" onclick="if(UA.indexOf(\'chrome\') != -1){alert(\''+L['chrome_fav_tip']+'\');return false;}window.external.addFavorite(this.href, this.title);return false;">'+t+'</a>');}
7function SendFav(mid, itemid) {
8	mid = mid ? mid : 0;
9	itemid = itemid ? itemid : 0;
10	var htm = '<form method="post" action="'+MEPath+'favorite.php" id="dfavorite" target="_blank">';
11	htm += '<input type="hidden" name="action" value="add"/>';
12	htm += '<input type="hidden" name="title" value="'+$('#title').html()+'"/>';
13	htm += '<input type="hidden" name="url" value="'+window.location.href+'"/>';
14	htm += '<input type="hidden" name="mid" value="'+mid+'"/>';
15	htm += '<input type="hidden" name="itemid" value="'+itemid+'"/>';
16	htm += '</form>';
17	$('#destoon_space').html(htm);
18	Dd('dfavorite').submit();
19}
20function SendReport(c) {
21	var c = c ? c : ($('#title').length > 0 ? $('#title').html() : document.title)+'\n'+window.location.href;
22	var htm = '<form method="post" action="'+DTPath+'api/report.php" id="dreport" target="_blank">';
23	htm += '<textarea style="display:none;" name="content">'+c+'</textarea>';
24	htm += '</form>';
25	$('#destoon_space').html(htm);
26	Dd('dreport').submit();
27}
28function Dshare(mid, id) {Go(DTPath+'api/share.php?mid='+mid+'&itemid='+id);}
29function Dsearch(i) {
30	if(Dd('destoon_kw').value.length < 1 || Dd('destoon_kw').value == L['keyword_message']) {
31		Dd('destoon_kw').value = '';window.setTimeout(function(){Dd('destoon_kw').value = L['keyword_message'];}, 500);
32		return false;
33	}
34	if(i && Dd('destoon_search').action.indexOf('/api/') == -1) {$('#destoon_moduleid').remove();$('#destoon_spread').remove();}
35	return true;
36}
37function Dsearch_adv() {Go(Dd('destoon_search').action.indexOf('/api/') != -1 ? DTPath+'api/search.php?moduleid='+Dd('destoon_moduleid').value : Dd('destoon_search').action);}
38function Dsearch_top() {if(Dsearch(0)){Dd('destoon_search').action = DTPath+'api/search.php';Dd('destoon_spread').value=1;Dd('destoon_search').submit();}}
39function View(s) {window.open(DTPath+'api/view.php?img='+s);}
40function setModule(i, n) {Dd('destoon_search').action = DTPath+'api/search.php';Dd('destoon_moduleid').value = i;searchid = i;Dd('destoon_select').value = n;$('#search_module').fadeOut('fast');Dd('destoon_kw').focus();}
41function setTip(w) {Dh('search_tips'); Dd('destoon_kw').value = w; Dd('destoon_search').submit();}
42var tip_word = '';
43function STip(w) {
44	if(w.length < 2) {Dd('search_tips').innerHTML = ''; Dh('search_tips'); return;}
45	if(w == tip_word) {return;} else {tip_word = w;}
46	$.post(AJPath, 'action=tipword&mid='+searchid+'&word='+w, function(data) {
47		if(data) {
48			Ds('search_tips'); Dd('search_tips').innerHTML = data + '<label onclick="Dh(\'search_tips\');">'+L['search_tips_close']+'&nbsp;&nbsp;</label>';
49		} else {
50			Dd('search_tips').innerHTML = ''; Dh('search_tips');
51		}
52	});
53}
54function SCTip(k) {
55	var o = Dd('search_tips');
56	if(o.style.display == 'none') {
57		if(o.innerHTML != '') Ds('search_tips');
58	} else {
59		if(k == 13) {Dd('destoon_search').submit(); return;}
60		Dd('destoon_kw').blur();
61		var d = o.getElementsByTagName('div'); var l = d.length; var n, p; var c = w = -2;
62		for(var i=0; i<l; i++) {if(d[i].className == 'search_t_div_2') c = i;}
63		if(c == -2) {
64			n = 0; p = l-1;
65		} else if(c == 0) {
66			n = 1; p = -1;
67		} else if(c == l-1) {
68			n = -1; p = l-2; 
69		} else {
70			n = c+1; p = c-1;
71		}
72		w = k == 38 ? p : n;
73		if(c >= 0) d[c].className = 'search_t_div_1';
74		if(w >= 0) d[w].className = 'search_t_div_2';
75		if(w >= 0) {var r = d[w].innerHTML.split('>'); Dd('destoon_kw').value = r[2];} else {Dd('destoon_kw').value = tip_word;}
76	}
77}
78function user_login() {
79	if(Dd('user_name').value.length < 2) {Dd('user_name').focus(); return false;}
80	if(Dd('user_pass').value == 'password' || Dd('user_pass').value.length < 6) {Dd('user_pass').focus(); return false;}
81}
82function show_answer(u, i) {document.write('<iframe src="'+u+'answer.php?itemid='+i+'" name="destoon_answer" id="des'+'toon_answer" style="width:100%;height:0px;" scrolling="no" frameborder="0"></iframe>');}
83function show_task(s) {document.write('<script type="text/javascript" src="'+DTPath+'api/task.js.php?'+s+'&refresh='+Math.random()+'.js"></sc'+'ript>');}
84var sell_n = 0;
85function sell_tip(o, i) {
86	if(o.checked) {sell_n++; Dd('item_'+i).style.backgroundColor='#F1F6FC';} else {Dd('item_'+i).style.backgroundColor='#FFFFFF'; sell_n--;}
87	if(sell_n < 0) sell_n = 0;
88	if(sell_n > 1) {
89		var aTag = o; var leftpos = toppos = 0;
90		do {aTag = aTag.offsetParent; leftpos	+= aTag.offsetLeft; toppos += aTag.offsetTop;
91		} while(aTag.offsetParent != null);
92		var X = o.offsetLeft + leftpos - 10;
93		var Y = o.offsetTop + toppos - 70;
94		Dd('sell_tip').style.left = X + 'px';
95		Dd('sell_tip').style.top = Y + 'px';
96		o.checked ? Ds('sell_tip') : Dh('sell_tip');
97	} else {
98		Dh('sell_tip');
99	}
100}
101function img_tip(o, i) {
102	if(i) {
103		if(i.indexOf('nopic.gif') == -1) {
104			if(i.indexOf('.thumb.') != -1) {var t = i.split('.thumb.');var s = t[0];} else {var s = i;}
105			var aTag = o; var leftpos = toppos = 0;
106			do {aTag = aTag.offsetParent; leftpos	+= aTag.offsetLeft; toppos += aTag.offsetTop;
107			} while(aTag.offsetParent != null);
108			var X = o.offsetLeft + leftpos + 90;
109			var Y = o.offsetTop + toppos - 20;
110			Dd('img_tip').style.left = X + 'px';
111			Dd('img_tip').style.top = Y + 'px';
112			Ds('img_tip');
113			Inner('img_tip', '<img src="'+s+'" onload="if(this.width<200) {Dh(\'img_tip\');}else if(this.width>300){this.width=300;}Dd(\'img_tip\').style.width=this.width+\'px\';"/>')
114		}
115	} else {
116		Dh('img_tip');
117	}
118}
119function Dqrcode() {
120	var url = $('meta[http-equiv=mobile-agent]').attr('content');
121	url = url ? url.substr(17) : window.location.href;
122	if($('#destoon_qrcode').length > 0) {
123		if($('#destoon_qrcode').html().length < 10) {
124			$('#destoon_qrcode').css({'position':'fixed','z-index':'99999','left':'50%','top':'0','margin-left':'-130px','width':'260px','background':'#FFFFFF','text-align':'center'});
125			$('#destoon_qrcode').html('<div style="text-align:right;color:#555555;font-size:16px;font-family:Verdana;font-weight:100;padding-right:6px;cursor:pointer;">x</div><img src="'+DTPath+'api/qrcode.png.php?auth='+encodeURIComponent(url)+'" width="140" height="140"/><div style="padding:10px 0;font-size:14px;font-weight:bold;color:#555555;">扫一扫,直接在手机上打开</div><div style="padding-bottom:20px;color:#999999;">推荐微信、QQ扫一扫等扫码工具</div>');
126			$('#destoon_qrcode').click(function(){$('#destoon_qrcode').fadeOut('fast');});
127		}
128		$('#destoon_qrcode').fadeIn('fast');
129	}
130}
131function Dmobile() {
132	var url = $('meta[http-equiv=mobile-agent]').attr('content');
133	Go(DTPath+'api/mobile.php'+(url ? '?uri='+encodeURIComponent(url.substr(17)) : ''));
134}
135function oauth_logout() {
136	set_cookie('oauth_site', '');
137	set_cookie('oauth_user', '');
138	window.location.reload();
139}

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.