📄
字号:
5%u6B64%u9875%u8FDB%u884C%u4E0B%u8F7D%u3002%u5F3A%u70C8%u5EFA%u8BAE%u60A8=
%u5B89%u88C5web%u8FC5%u96F7%uFF0C%u4F53%u9A8C%u6025%u901F%u4E0B%u8F7D%u76=
84%u4E50%u8DA3%uFF01%u70B9%u51FB%u786E%u5B9A%u5373%u523B%u5B89%u88C5web%u=
8FC5%u96F7");
thunderLanguage["AllSetUpInfo"] =
=3Dunescape("%u6B64%u94FE%u63A5%u4E3A%u8FC5%u96F7%u4E13%u7528%u4E0B%u8F7D=
%u901A%u9053%uFF0C%u5FC5%u987B%u5B89%u88C5WEB%u8FC5%u96F7%u6216%u8FC5%u96=
F75%u624D%u80FD%u8FDB%u884C%u4E0B%u8F7D%uFF0C%u5B89%u88C5%u540E%u8BF7%u91=
CD%u65B0%u8FDB%u5165%u6B64%u9875%u8FDB%u884C%u4E0B%u8F7D%u3002%u5F3A%u70C=
8%u5EFA%u8BAE%u60A8%u5B89%u88C5web%u8FC5%u96F7%uFF0C%u4F53%u9A8C%u6025%u9=
01F%u4E0B%u8F7D%u7684%u4E50%u8DA3%uFF01%u70B9%u51FB%u786E%u5B9A%u5373%u52=
3B%u5B89%u88C5web%u8FC5%u96F7");
thunderLanguage["MethodUnSupported"] =
=3Dunescape("%u4E0D%u652F%u6301%u6B64%u65B9%u6CD5%uFF0C%u8BF7%u5B89%u88C5=
%u6700%u65B0%u7684%u8FC5%u96F7%u5BA2%u6237%u7AEF");
thunderLanguage["FFDenied"] =
=3Dunescape("%u6B64%u64CD%u4F5C%u88AB%u6D4F%u89C8%u5668%u62D2%u7EDD%uFF01=
%0A%u8BF7%u5728%u6D4F%u89C8%u5668%u5730%u5740%u680F%u8F93%u5165%u201Cabou=
t%3Aconfig%u201D%u5E76%u56DE%u8F66%0A%u7136%u540E%u5C06%5Bsigned.applets.=
codebase_principal_support%5D%u8BBE%u7F6E%u4E3A%27true%27");
var Thunder =3D {
isIE:(navigator.userAgent.indexOf('MSIE')>0),
isOpenNew:null,
infoType:0,
thunderType:0,=09
mustUseSelected:null,
pId:"",
judgeThunder:function(sid){
var webcop =3D [];
sid=3Dsid?sid:this.pId;
if(webcop[sid]=3D=3D1){
return 3; =09
}
else
return false;
},
getInstance: function(th){ =09
=09
/*Get download style*/
if(this.isOpenNew=3D=3Dnull)
=
try{this.isOpenNew=3D(thunder_isOpenNewWindow=3D=3D10?true:false)}catch(e=
){}
if(this.mustUseSelected=3D=3Dnull)
=
try{this.mustUseSelected=3DmustBeSelectedThunder;}catch(e){this.mustUseSe=
lected=3Dfalse;}
/*Get download client type*/
if(this.judgeThunder()){
this.thunderType=3Dthis.judgeThunder()
this.mustUseSelected=3Dtrue;
}else{
if(!this.thunderType)
{
try{
switch(selectThunderType)
{
case "coThunder5":
this.thunderType=3D4;
break;
case "coWebThunder":
default:
this.thunderType=3D3;
}
}catch(e){this.thunderType=3D3;this.mustUseSelected=3Dfalse;}
}else{
=09
}
}
if(this.isIE){ =09
var begi,endi; =09
if(this.thunderType=3D=3D3) begi=3D0; else begi=3D1;
if(this.mustUseSelected) endi=3Dbegi; else endi=3D1-begi;
var strEx=3D"i++";strJudge=3D"i<=3Dendi";
if(endi<begi){strEx=3D"i--";strJudge=3D"i>=3Dendi";}
var opt =3D [Thunder.WebThunder,Thunder.Thunder5];
for(var i=3Dbegi;eval(strJudge);eval(strEx))
{=09
=09
var tmpObj=3Dopt[i].getInstance(); =09
if(tmpObj!=3Dnull)
return tmpObj;
else
continue;
}
}else{
var oAtmp=3DThunder.ffThunder.getInstance(); =09
if(oAtmp){
var clientType=3DoAtmp.getClientType();
//No client has been seted up
if(clientType=3D=3D0) return null;
if(this.mustUseSelected){ =09
if((this.thunderType=3D=3D4 && =
clientType=3D=3D2)||(this.thunderType=3D=3D3 && clientType=3D=3D1))
oAtmp=3Dnull =09
}else{
=09
}
}
return oAtmp;
}
return null; =09
},=09
companySetup:function(sCompany,sPid){
try {
sPid=3DsPid?sPid:this.pId;
vhref =3D "http://analytics.xunlei.com/PV?peerid=3D" + sPid + =
"&uri=3D" + sCompany + "&src=3D" + document.location.href + =
"&screensize=3D" +window.screen.width +"*" +window.screen.height;
image1 =3D new Image(1,1);
image1.src =3D vhref;
}catch(e){}
},
setParameter: function(cid, url, refer, stat){
=09
cid=3Dcid?cid:this.pId;
=09
var inputs =3D ["thunder_cid", "thunder_down_url", =
"thunder_down_pageurl", "thunder_stat_pageurl"];
var input;
for (var i=3D0; i<inputs.length; i++){
if (isUndef(input =3D $(inputs[i]))){
input =3D document.createElement("input");
input.type =3D "hidden";
input.id =3D inputs[i];
document.body.appendChild(input);
}
input.value =3D arguments[i];
}
},
=09
download: function( url, refer, name, stat,cid){
var client;
client=3Dthis.getInstance();=09
=20
this.pId=3Dthis.pId?this.pId:(cid?cid:"");
cid=3Dcid?cid:this.pId;
if(!client){ =09
if(!this.isIE && (client=3D=3D0)){}else{this.showSetUpInfo(cid);}
}else{ =09
if (this.isIE)
{ =09
client.download(cid, url, refer, name, stat);
}else{
switch(this.thunderType){
case 4:
client.download(cid, url, refer, name, stat,1);
break;
case 3: default:
client.download(cid, url, refer, name, stat,2); =09
}=09
=09
}
=09
}
return false;
},
openWindow:function(url,flag){ =09
=20
var s=3Dflag?flag:false;
if(!this.isOpenNew)
{
var Info;
if(this.mustUseSelected)
{
if(this.thunderType=3D=3D3)
Info=3DthunderLanguage["WebThunderSetUpInfo"];
else
Info=3DthunderLanguage["Thunder5SetUpInfo"];
}else{
Info=3DthunderLanguage["AllSetUpInfo"];
}
}
=09
//Open a dialogbox which tell user to setup thunder client
if(Info) alert(Info);
if(this.infoType =3D=3D 10 && !s)
top.location.href =3Durl;
else
window.open(url,"WEBTHUNDER_SET_UP");
},
=09
showSetUpInfo:function(pid){
var url;
=09
pid=3Dpid?pid:this.pId;
if(this.isOpenNew){
//Goto thunder download page
if(pid.substr(0,1)=3D=3D"g")
url=3D"http://my.xunlei.com/setup.htm?gid=3Dg"+pid;
else
url=3D"http://cop.my.xunlei.com/setup/index.html?pid=3D"+ pid; =09
}else{
if(this.isIE)
{
if(this.mustUseSelected)
{
if(this.thunderType=3D=3D3)
=
url=3D"http://ftp.union.sandai.net/webthunder/union/webxl_g"+pid+".exe";
else
=
url=3D"http://ftp.union.sandai.net/webthunder/union/webxl_g"+pid+".exe";
}else{
=
url=3D"http://ftp.union.sandai.net/webthunder/union/webxl_g"+pid+".exe";
}
}else{
if(this.mustUseSelected)
{
if(this.thunderType=3D=3D3)
=
url=3D"http://ftp.union.sandai.net/webthunder/union/webxl_g"+pid+".exe";
else
=
url=3D"http://ftp.union.sandai.net/webthunder/union/webxl_g"+pid+".exe";
}else{
=
url=3D"http://ftp.union.sandai.net/webthunder/union/webxl_g"+pid+".exe";
}
}
}
this.openWindow(url); =09
}
}
Thunder.WebThunder =3D Class.create();
Thunder.WebThunder.getInstance =3D function(){
if (isUndef(this._thunder))
{
//Web app initialized here
try{
this._thunder =3D new Thunder.WebThunder(); =09
}catch(e){
this._thunder=3Dnull;
}
}=09
return this._thunder;
}
Thunder.WebThunder.prototype =3D {=09
initialize: function(){=09
try{
this.__thunder =3D this.getThunder();
}catch(e){
throw(e);
}
},
getThunder:function(){
try{
return new ActiveXObject("ThunderServer.webThunder.1");
}catch(e){
throw(e);
}
},=09
/*get server build version*/
getVersion: function(){
return parseInt(this.__thunder.GetVersion().split(".")[3]);
},
=09
download: function(cid,url,refer,name,stat){=09
if ((url.indexOf("mms://") !=3D -1) || (url.indexOf("rtsp://")!=3D =
-1))
{
return true;
}else{ =09
this.__thunder.CallAddTask(Decode(url),Decode(stat),Decode(refer),1, =
"", Decode(name)); =09
return false;
}
}
}
Thunder.Thunder5 =3D Class.create();
Thunder.Thunder5.getInstance =3D function(){
if (isUndef(this._thunder))
{
try{
this._thunder =3D new Thunder.Thunder5();}
catch(e){
this._thunder =3D null;}
}
return this._thunder;
}
Thunder.Thunder5.prototype =3D {
initialize: function(){
try{
this.__thunder =3D new ActiveXObject("ThunderAgent.Agent.1");
}catch(e){throw(e);}
},
=09
download: function(cid, url, refer, name, stat){
try{ =09
name=3Dname?name:"";
this.addTask('', url, refer, name, stat);
this.commitTasks();
}catch(e){
alert(e.message);
}
},
=09
addTask: function(cid, url, refer, name, stat){
var _addTask =3D [
Delegate.create(this, function(){this.__thunder.AddTask4(url, "", "", =
name, refer, -1, 0, -1, document.cookie, cid, stat);}),
Delegate.create(this, function(){this.__thunder.AddTask3(url, "", "", =
name, refer, -1, 0, -1, document.cookie, cid);}),
Delegate.create(this, function(){this.__thunder.AddTask2(url, "", "", =
name, refer, -1, 0, -1, document.cookie);}),
Delegate.create(this, function(){this.__thunder.AddTask(url, "", "", =
name, refer, -1, 0, -1);})
];
for (var i=3D0; i<_addTask.length; i++){
try{
_addTask[i]();
return;
}catch(e){=09
}
}
throw thunderLanguage["MethodUnSupported"];
},
=09
commitTasks: function(){
var _commitTasks =3D [
Delegate.create(this, function(){this.__thunder.CommitTasks2(1);}),
Delegate.create(this, function(){this.__thunder.CommitTasks();})
];
for (var i=3D0; i<_commitTasks.length; i++){
try{
_commitTasks[i]();
return;
}catch(e){
}
}
throw thunderLanguage["MethodUnSupported"];
}
}
Thunder.ffThunder=3D Class.create();
Thunder.ffThunder.getInstance=3Dfunction(){ =09
if(isUndef(this._thObj) || this._thObj=3D=3D0){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -