用hta实现制作的无殇 - 快书V1.1打包下载了第1/2页_hta教程-查字典教程网
用hta实现制作的无殇 - 快书V1.1打包下载了第1/2页
用hta实现制作的无殇 - 快书V1.1打包下载了第1/2页
发布时间:2016-12-28 来源:查字典编辑
摘要:用hta实现制作的无殇-快书V1.1打包下载了无殇-快书V1.1vartimeout=180;varmyurl="http://minhai...

用hta实现制作的无殇-快书V1.1打包下载了

<html>

<head>

<title>无殇-快书V1.1</title>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">

<HTA:APPLICATIONID="QuickBook"

ICON="book.ico"/>

<linkrel="ShortcutIcon"href="book.ico">

<linkrel="Bookmark"href="book.ico">

<styletype="text/css">

<>

</style>

<script>

vartimeout=180;

varmyurl="http://minhai.go1.icpcn.com/";

varmyhome="http://minhai.ys168.com";

varmyasp="http://minhai.8u3.8u.com/"

functionerr(a,b,c)

{

if(a==1){

if(confirm("程序出现未知错误,请联系:minkuwu@21cn.com!n是否从网站下载最新版本?"))

window.open(myhome);

window.close();

}elseif(a==2){

alert("下载目录失败,可能对方网站无法访问或本机网络无法连通,尝试下载新版本!");

clearTime();

bar(3);

}elseif(a==3){

alert("找不到小说,请确认小说参数正确,如正确请尝试更新版本!");

bar(4);

}else{

if(confirm("发生未知错误n错误名称:"+a+"n错误行数:"+c+"n是否把错误发送到网上去,以便作者进行更新?"))

window.open(myasp+"er.asp?name="+document.title+"&er="+a+"&c="+c);

}

returntrue;

}

window.onerror=err;

</script>

<bodyoncontextmenu='cl();returnfalse'>

<COMMENTid="DownImg"></COMMENT>

<scriptsrc="Code.js"language="JavaScript"></script>

<center>需要帮助请按F1欢迎访问《<ahref="http://minhai.ys168.com">无殇主页</a>》<imgsrc="close.jpg"height=12onclick="this.parentNode.removeNode(true);"></center>

<tablewidth='100%'border='0'cellpadding='0'cellspacing='0'class=ta>

<formname="ti"onsubmit="download();returnfalse;">

<tr>

<tdwidth="18%"><inputtype=buttonclass=buvalue="检查更新"onclick="getnew(document.title);"><inputtype=buttonclass=buvalue="软件测试"onclick="cheshi();"><br><inputtype=buttonclass=buvalue="报告错误或提交建议"onclick="sender();"></td>

<tdwidth="38%">打开:<inputclass=tx1type="text"onblur="this.value=checkpath(this.value,false);if(checkpath(this.value)!=''){newpath.value=checkpath(this.value,false);}"name="Folder"class="tx1"><inputtype=buttonclass=buvalue="打开路径"id=opfonclick='Folder.value=checkpath(BrowseFolder(),false);newpath.value=Folder.value'><br>另存为:<inputclass=tx1type="text"name="newpath"class="tx1"onblur="this.value=checkpath(this.value,false);if(this.value=='')this.value=Folder.value;"><inputtype=buttonclass=buvalue="创建路径"onclick='if(checkpath(newpath.value,true)!="")alert("创建"+newpath.value+"完成");'></td>

<tdwidth="44%">下载站点:

<selectname="book"class=tx1onchange="showsearch(this.value);">

<optionvalue=1selected>起点文学</option>

<optionvalue=2>爬爬书库</option>

<optionvalue=3>玄幻书殿</option>

<optionvalue=4>思源中文</option>

<optionvalue=5>79文学网</option>

<optionvalue=6>虚拟天空</option>

<optionvalue=7>梦想文学</option>

<optionvalue=8>翠微居</option>

<optionvalue=9>逐浪网</option>

</select>文字编码:<selectname=fanclass=tx1><optionvalue=0>保持原样</optioin><optionvalue=1>繁转简</optioin><optionvalue=2>简转繁</optioin></select><br>

HTML-->TXT<inputtype=checkboxonclick="if(this.checked){huan.checked=false;wap.checked=false;}divs();"name="txt">

HTML-->WAP<inputtype=checkboxonclick="if(this.checked){huan.checked=false;txt.checked=false;}divs();"name="wap">

文本替换器<inputtype=checkboxonclick="if(this.checked){wap.checked=false;txt.checked=false;}divs();"name="huan"></td>

</tr>

<tr><tdcolspan=2>

<tablewidth='100%'border='0'cellpadding='0'cellspacing='0'>

<tr>

<td>搜索:书名:<inputsize="12"name="word"onkeydown="if(event.keyCode==13){sbu.click();returnfalse;}"class=tx1><inputtype="button"name="sbu"value="翠微居"class=bu><selectname="yi"class=tx1><optionvalue=0>异步</option><optionvalue=1>同步</option></select></td>

<tdwidth=30%>

<inputtype="submit"name="Submit"class=buvalue="下载"><inputtype="reset"id="ass"class=buvalue="重置"onclick="divr();">

</td>

</tr></table>

</td>

<td>下载超时:<inputtype=textname="cao"onfocus="this.select();"class=tx1size=4onblur="if(isNaN(this.value))this.value=timeout;elsetimeout=this.value;"><inputtype=buttonvalue="获取网址参数"class=buonclick="getch(document.all.book.value);"><inputtype=buttonvalue="显示网站小说"class=buonclick="showxiao();"></td></tr>

<tr><tdcolspan=3align=middle><fontcolor=red>请输入小说参数:</font><spanid="urldiv1"></span><inputtype=textclass=tx1size=6name="url"onFocus="this.select();"onblur="varre=geturl(book.value);if(this.value.replace(re,'')!='')this.value=''"ondblclick="this.select();document.execCommand('paste');"><spanid="urldiv2"></span></td></tr>

</form>

</table>

<formname="search"method="post"><inputtype=textname="key"></form>

<tablewidth='100%'border='0'cellpadding='0'cellspacing='0'class=taid="tihuan">

<tr>

<formname="th">

<tdwidth='5%'></td>

<td><fontsize=3color=red><br>纯文本替换:</font>替换个数<inputtpye=textclass="tx1"value=1size=3onchange="if(!isNaN(this.value))setid(this.value)"onfocus="this.select();">把HTML转换成TXT<inputtype=checkboxname="zhuan"onclick="if(this.checked){this.parentNode.children[1].value=0;dis(this.parentNode.children[3],1);setid(0);}else{dis(this.parentNode.children[3],0);}"><span>删除源文件<inputtype=checkboxname="yuan"></span></td>

<td></td>

</tr>

<tr>

<td></td>

<td>替换<b>1</b>:<textarearows=7cols=40name="ti1"class="tx1"></textarea>成<textarearows=7cols=40name="hu1"class="tx1"></textarea></textarea><br></td>

<td>正则替换:<inputtype=checkboxname="zenze"><br>全部替换:<inputtype=checkboxcheckedname="tihuan"><br>忽略大小写:<inputtype=checkboxname="da"></td>

</tr>

<tr>

<td></td>

<td><center><inputtype=buttononclick='if(obj.Folder.value!=""){tihu(obj.Folder.value,obj.newpath.value);}else{alert("请先打开欲替换的目录!");obj.opf.click();}'class=buvalue="替换"><inputtype=resetclass=buvalue="重置"></center></td>

<td></td>

</tr>

</form>

</table>

<divid="show"';">

<spanid="menu"></span>

<tablealign="center"width="40%"border="0"cellpadding="0"cellspacing="1"bgcolor="#000063"id="jin">

<tr>

<tdbgcolor="#ffffff">

</td>

</tr>

<tr>

<tdbgcolor="#ffffff"align="center"></td>

</tr>

<tr>

<tdbgcolor="#ffffff"align="center"></td>

</tr>

</table>

<br>

<tablealign=centerwidth='70%'border='0'cellpadding='0'cellspacing='1'bgcolor=#000000>

<trbgcolor=#ffffff>

<tdalign=centerid="loading"></td>

<tdalign=centerid="downer"></td>

</tr>

</table>

</div>

<tablealign=centerwidth='50%'border='0'cellpadding='0'cellspacing='1'bgcolor=#000000id=csnone'">

<trbgcolor=#ffffff>

<tdalign=center>

</td>

</tr>

</table>

<scriptlanguage="javascript"defer>

//初始化数据

String.prototype.getid=function(){returndocument.getElementById(this);}

vartheFSO=newActiveXObject("Scripting.FileSystemObject");

varajax=newArray("Microsoft.XMLHTTP","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP");

varxmlhttp;

for(vari=0;i<ajax.length;i++)

try{xmlhttp=newActiveXObject(ajax[i]);break;}catch(e){}

varadodbStream=newActiveXObject("ADODB.Stream");

varrs=newActiveXObject("ADODB.RecordSet");

//初始化全局变量

varobj=document.ti,m,newurl,cl1,cl2,ll,url1,url2,thelist="",downlist,dxing,thetime,der,there,newpic,stop=0,mdb,zhangting;

varzhen=newArray();

obj.book.onchange();

document.all.cao.value=timeout;

//开始下载

functiondownload()

{

if(document.all.url.value=="")

{

alert("请输入小说参数!");

document.all.url.focus();

return;

}

clearTime();

dis("show",1);

dis("menu",1);

dis("jin",0);

dis("loading",0);

dis("show".getid().children[3],0);

thelist="";

"menu".getid().innerHTML="<tablealign=centerwidth='50%'border='0'cellpadding='0'cellspacing='1'bgcolor=#000000><trbgcolor=#ffff00><tdalign=center>正在下载小说目录……<fontid='cshi'color=RED></span></td></tr></table>";

setTimeout("downmenu();",10);

}

//下载目录

functiondownmenu()

{

varfan=document.all.yi.value==0?true:false;

cl1=null;cl2=null;

if(fan)

{

if("cshi".getid()==null)return;

"cshi".getid().innerText=timeout;

clearTime();

thetime=setInterval(function()

{

if("cshi".getid()==null||xmlhttp.readyState==0){clearTime();return;}

if(xmlhttp.readyState<4)

{

if("cshi".getid().innerText==1)

{

clearTime();

bar(5);

}else

"cshi".getid().innerText=parseInt("cshi".getid().innerText)-1;

}elseclearTime();

},1000);

}

varstr=gettxt(url1+document.all.url.value+url2,fan,function()

{

varthestr;

if(xmlhttp.readyState<4)return;

if(xmlhttp.readyState!=4){err(2);return;}

bar(2);

if(obj.book.value==9)

setTimeout(function(){showmenu(gb2(xmlhttp.responseBody));},10);

else

setTimeout(function(){showmenu(gb(xmlhttp.responseBody));},10);

return;

},obj.book.value);

if(!fan)

{

if(typeof(str)!="object"){err(2);return;}

bar(2);

setTimeout(function(){showmenu(str[0]);},10);

}

}

functionbar(id,color1,color2){

varstr,color1,color2;

if(id==2)

{

str="处理小说目录中……";

color1="#000000";

color2="#00ff00";

}else{

str=id==3?"访问小说网站失败,无法连接!":id==4?"找不到小说!":"网络超时,对方网站未反应"

color1="YELLOW";

color2="#8C0000";

}

"menu".getid().firstChild.rows[0].cells[0].innerHTML="<fontcolor="+color1+">"+str+"</font>";

"menu".getid().firstChild.rows[0].bgColor=color2;

}

//显示小说目录

functionshowmenu(str)

{

if(str==null||str==""){err(2);return;}

varp,re,k=0,c=0;

varmulu=newArray("<tablealign=centerwidth='80%'border='0'cellpadding='0'cellspacing='1'class='ta'>");

varlist=newArray();

newurl="";

m="";

switch(parseInt(obj.book.value))

{

//起点中文

case1:

m=cmfu(str);

p=m.match(/title>(.*?)s--/i);

varj,b,s="ObjectNotFoundHTTP/1.1",i=1,r=/ObjectNotFoundHTTP/1.1|<TITLE>无法找到该页</TITLE>/,bb="6|8|2|7|5|1|3|4|9|10".split("|");

newurl="http://newauthor6.cmfu.com/books/"+document.all.url.value+"/"

re=/<a.+?'(d+).htm'[sS]+?>(.+?)</a>|<fontcolor=black>(.+?)</font>/gi;

if(p==null||p=="")

{

err(3)

return;

}

vararr;

mulu[mulu.length]=xiaomenu(p[1]);

while(re.test(m))

{

if(RegExp.$3!="")

{

if(k==1){mulu[mulu.length]="<tdwidth='25%'></td></tr>";k=0;}

mulu[mulu.length]=xiaomenu1(RegExp.$3);

j=RegExp.$3;

}else{

if(k==0)mulu[mulu.length]='<tr>';

mulu[mulu.length]=xiaomenu2(c,RegExp.$1+"|"+j,RegExp.$2);

c++;

if(k==1)mulu[mulu.length]="</tr>";

k=(k==1)?0:1

if(b==null)

{

while(r.test(s)&&i++<10)

{

newurl=newurl.replace(/d/,bb[i]);

s=gettxt(newurl+arr+".txt",false);

if(typeof(s)=="object")s=s[0];

}

b=i;

}

}

}

break;

//爬爬书库

case2:

m=pap(str);

newurl=url1+document.all.url.value+"/"

re=/<aD+(d+).htm[^>]+>(.+?)</a>|2px'>(.*?)</td>/gi;

p=str.match(/<TITLE>(.*?)_目录_爬爬书库/i)

mulu=themu(mulu,p,m,re);

break;

//玄幻书殿

case3:

zfile=null;

str.replace(/(http://book.xhsd.net/book/d*/d*/)page.js/,function(a,b){newurl=b;})

str=gettxt(newurl+"page.js",false)

if(typeof(str)!="object"){err(2);return;}

eval(str[0].replace("var",""))

if(newurl==""||newurl==null||zfile==null)

{

err(3);

return;

}

m=xhm(zfile);

m='<html>rn<head>rn<title>目录</title>rn<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">rn<style>rn.box{rnborder-collapse:collapsern}rnbody{margin-top:5px;}rntd{rnfont-size:9pt;rn}rnrna{rnfont-size:9pt;rncolor:#000066;rntext-decoration:none;rn}rnrna:link{rnfont-size:9pt;rncolor:#000066;rntext-decoration:none;rn}rna:visited{rnfont-size:9pt;rncolor:#000000;rntext-decoration:none;rn}rna:hover{rnfont-size:9pt;rncolor:#FF0000;rntext-decoration:underline;rn}rna:active{rnfont-size:9pt;rncolor:#000000;rntext-decoration:none;rn}rnrn</style>rn</head>rn<center>rn<BODY>rn<tablewidth="760"border=1cellpadding=2cellspacing=0bordercolor="#808080"bgcolor="white"class="box">rn<tr><tdcolspan="4"nowrapbgcolor="#808080"><fontcolor="#FFFFFF"><b>目录</b></font></td></tr>rn'+m+'rn<tr><tdcolspan="4">rn</td>rn</tr>rn</table>rn</BODY></center></html>';

list=list.concat(zfile)

mulu[mulu.length]=xiaomenu(_name);

for(vari=0;i<list.length-1;i+=2)

{

if(zfile[i]=="__")

{

if(k==1){mulu[mulu.length]="<tdwidth='25%'></td></tr>";k=0;}

mulu[mulu.length]=xiaomenu1(list[i+1]);

}else{

if(k==0)mulu[mulu.length]='<tr>';

mulu[mulu.length]=xiaomenu2(c,list[i],list[i+1]);

c++;

if(k==1)mulu[mulu.length]="</tr>";

k=(k==1)?0:1

}

}

break;

//思源中文

case4:

m=shim(str);

p=m.match(/title>([^-]+)--/i)

newurl=url1+document.all.url.value+"/"

re=/<ahref="(d+).htm">(.+?)</a>|vcss">[rn]+s+(S+)s/gi;

mulu=themu(mulu,p,m,re);

break;

//79文学网

case5:

m=mu79(str);

newurl=url1+document.all.url.value+"/"

re=/<ahref="(d+).[^>]+>(.+?)</a>|<divid="NclassTitle">(.+?)</div>/gi;

p=m.match(/<title>(.*?)</title>/i)

mulu=themu(mulu,p,m,re);

break;

//虚拟天空

case6:

m=xkm(str);

p=str.match(/<title>(.+?)-.*?-虚拟天空/)

newurl="http://www.xntk.com/book_j.php?tid="+document.all.url.value.split("/")[0]+"&bid="+document.all.url.value.split("/")[1]+"&cid=";;

re=/<aD+(d+).htm>(.*?)</a>|max2'>(.*?)</td>/gi

mulu=themu(mulu,p,m,re);

break;

//梦想文学

case7:

m=mx99(str);

p=str.match(/title>(.*?)--/i)

newurl=url1+document.all.url.value+"/"

re=/<aD+(d+).htm[^>]+>(.*?)</a>|=xt>(.*?)</td>/gi;

mulu=themu(mulu,p,m,re);

break;

//翠微居

case8:

newurl=url1+document.all.url.value+"/"

p=str.match(/<title>(.*?)(?:-[^-]+)+</title>/i)

m=cwm(str)

re=/<aD+(d+).htm">(.+?)</a>|vcss">(.+?)</td>/gi

mulu=themu(mulu,p,m,re);

break;

//逐浪网

case9:

newurl=url1+document.all.url.value+"/"

m=zhu(str);

p=m.match(/<title>(.+?)|.+?</title>/i)

re=/<ahref="(d+)[^>]+>(.+?)</a>|bottomborder">(.+?)</li>/gi

mulu=themu(mulu,p,m,re);

break;

default:err(1);return;

}

if(mulu==null)return;

mulu[mulu.length]="</tr><tr><tdcolspan='2'align=center><inputtype=buttononclick='xuan(1);'value='选中'class=bu><inputtype=buttononclick='xuan(2);'value='反选'class=bu><inputtype=buttononclick='chuanxuan(1);'value='全选'class=bu><inputtype=buttononclick='chuanxuan(2)'value='全反选'class=bu><inputtype=buttonclass=buonclick="if(obj.Folder.value==''){alert('请先选择目录!');obj.opf.click();if(obj.Folder.value=='')return;}downxiao();"value='下载小说'id='ddo'>下载目录<inputtype=checkboxcheckedname='xml'>下载图片<inputtype=checkboxcheckedname='dp'>图片异步下载<inputtype=checkboxcheckedname='picdown'></td></tr></table>"

"menu".getid().innerHTML=mulu.join("");

return;

}

functionthemu(mulu,p,str,re)

{

vark=0,c=0;

if(p==null||p=="")

{

err(3);

return;

}

mulu[mulu.length]=xiaomenu(p[1]);

while(re.test(str))

{

if(RegExp.$3!=""){

if(k==1){mulu[mulu.length]="<tdwidth='25%'></td></tr>";k=0;}

mulu[mulu.length]=xiaomenu1(RegExp.$3);

}else{

if(k==0)mulu[mulu.length]='<tr>';

mulu[mulu.length]=xiaomenu2(c,RegExp.$1,RegExp.$2);

c++;

if(k==1)mulu[mulu.length]="</tr>";

k=(k==1)?0:1

}

}

if(k==1)mulu[mulu.length]="<tdwidth='25%'></td>";

returnmulu;

}

//开始下载章节

functiondownxiao(n)

{

if(thelist==null||thelist=="")

{

alert("请至少选择一个章节!");

return;

}

clearTime();

if(n==null)

{

dis("menu",0);

dis("jin",1);

dis("show".getid().children[3],1);

dis("loading",1);

dis("downer",0);

"loading".getid().innerHTML="";

"downer".getid().innerHTML="";

der=0;

dxing=thelist;

stop=0;

downlist=thelist.split(",");

document.body.oncontextmenu=function(){returnfalse;}

n=0;

zhangting=newArray();

jin.rows[0].cells[0].innerHTML='<tableborder="0"width="0%"bgcolor="#000063"><tr><tdwidth="100%"height="15"align="center"><fontcolor="white"><b>0%</b></font></td></tr></table>'

jin.rows[1].cells[0].innerHTML='0/'+(thelist.split(',').length-1)

jin.rows[2].cells[0].innerHTML='<inputtype=buttonname="zhan"class=buvalue="暂停"><inputtype=buttonname="ting"class=buvalue="停止">'

oldtime=newDate().getTime();

switch(parseInt(obj.book.value))

{

case4:there=/<imgsrc="([^"]+)"/gi;break;

case5:there=/<imgsrc="([^"]+)"/gi;break;

case6:there=/<imgsrc=([^>]+)/gi;break;

case7:there=/<IMG.+?src="([^"]+)"/gi;break;

default:break;

}

document.all.zhan.onclick=function()

{

this.value=(stop===2)?"暂停":"继续";

if(stop===0)

{

stop=2;

}else{

stop=0;

switch(parseInt(zhangting[0]))

{

case0:downxiao(zhangting[1]);break;

case1:downzhang(zhangting[1]);break;

case2:editzhang(zhangting[1],zhangting[2],zhangting[3],zhangting[4]);break;

case3:pic(zhangting[1]);break;

case4:downpic(zhangting[1]);break;

case5:adderr(zhangting[1],zhangting[2]);break;

case6:downover(zhangting[1],zhangting[2]);break;

default:err(1);break;

}

}

}

}

if(stop!==0)

{

if(stop==2)zhangting=newArray(0,n);

return;

}

n++

document.all.ting.onclick=newFunction("downover("+n+",1);");

if("loading".getid().innerHTML.split("<BR>").length>=15)

{

"downer".getid().innerHTML+="loading".getid().innerHTML;

"loading".getid().innerHTML=""

}

"loading".getid().innerHTML+=((n==1)?"":"<br>")+"<spanid='wang'>正在</span>下载[<fontcolor=blue><b>"+menulist[downlist[n]].innerHTML.replace(/^<.*?>/,"")+"</b></font>]<fontid='cheng'>……</font><fontid='caoshi'color='#E98D00'></font>";

setTimeout("downzhang("+n+")",1);

}

functiondownzhang(n)

{

if(stop!==0)

{

if(stop==2){zhangting=newArray(1,n);}

return;

}

if(downlist==null)return;

yan(downlist[n],0);

varbo=document.all.book.value

varp=checkpath(obj.Folder.value+document.all.xname.value+"--"+obj.book.options[obj.book.selectedIndex].text+"",true);

newpic=newArray();

if(bo==9&&n==1&&!document.all.txt.checked&&!document.all.wap.checked)

{

try{

SaveText(gettxt("http://www.zhulang.com/book.css",false)[0],p+"book.css");

}catch(e){

"loading".innerHTML+="<br>保存[<fontcolor=#E98D00>风格文件</font>]<fontcolor=red>失败</font>!"

}

}

if(n==1&&document.all.xml.checked)

{

try{

SaveText(m,p+"index.htm");

if(bo==4)

SaveText(gettxt("http://book.syzw.cn/configs/article/page.css",false)[0],p+"page.css");

elseif(bo==7)

SaveText('bodyrn{rnbackground-color:#E7F4FErn}rn.zt{font-size:10.5pt;line-height:160%;font-family:"宋体","verdana","Arial","MSSansSerif";}rn.m{padding-left:80px;padding-right:80px;TEXT-INDENT:2em;FONT-FAMILY:宋体;font-size:16px;LINE-HEIGHT:130%;}rnP{TEXT-INDENT:2em;}rn.b{background-color:#663366;font-size:12px;color:#ffffff;}rn.i{font-size:10pt;}rnA:link{COLOR:#004D00;TEXT-DECORATION:none}rnA:active{COLOR:blue;TEXT-DECORATION:underline}rnA:visited{COLOR:#004D00;TEXT-DECORATION:underline}rnA:hover{COLOR:blue;TEXT-DECORATION:underline;position:relative;left:1px;top:1px}',p+"css.css")

elseif(bo==8)

SaveText('body{rntfont-family:宋体,新细明体,Verdana,Arial,sans-serif;rntfont-size:14px;rn}rnrna{rntcolor:#0A672E;rnttext-decoration:none;rn}rnrna:hover{rntcolor:#666666;rn}rnrnhr{rntheight:1px;rntwidth:100%;rntcolor:#000000;rntpadding:0px;rntmargin:0px;rn}rn#title{rntext-align:center;rntfont-size:16px;rntfont-weight:bold;rntline-height:200%;rn}rnrn#content{rntext-align:left;rntpadding:10px3%10px3%;rntfont-size:16px;rn}rnrn.acss{rnwidth:90%;rntext-align:left;rntbackground:#CBCDCC;rn}rnrn.vcss{rntfont-size:16px;rnbackground:#E0FFD7;rntext-align:center;rn}rnrn.ccss{rnfont-size:14px;rnbackground:#EFFEE9;rnwidth:25%;rnttext-align:leftr;rn}rnrn#footlink{rnttext-align:center;rntline-height:200%;rn}rnrn#info{rnttext-align:center;rntline-height:200%;rn}',p+'page.css')

elseif(bo==6)

SaveText('A{TEXT-DECORATION:none}rnA:link{COLOR:#333333}rnA:visited{COLOR:#a650;}rnA:hover{COLOR:#ff6600}rnBODY{SCROLLBAR-FACE-COLOR:#eeeeee;FONT-SIZE:9pt;SCROLLBAR-HIGHLIGHT-COLOR:#f0f0f0;SCROLLBAR-SHADOW-COLOR:#999999;COLOR:#000000;SCROLLBAR-3DLIGHT-COLOR:#eeeeee;SCROLLBAR-ARROW-COLOR:#000000;SCROLLBAR-TRACK-COLOR:#eeeeee;FONT-FAMILY:宋体;SCROLLBAR-DARKSHADOW-COLOR:#eeeeee;TEXT-DECORATION:none}rnTD{FONT-SIZE:9pt;COLOR:#333333;LINE-HEIGHT:150%;FONT-FAMILY:宋体}rn.min{font-family:'宋体';font-size:10pt;}rn.middl{font-size:14px;line-height:18px}rn.max{font-family:'宋体';font-size:12pt;font-weight:bold;}rn.max2{font-family:'宋体';font-size:10pt;background-color:'#E3E3E3'}',p+'2007.css');

elseif(bo==9){

SaveText(gettxt("http://www.zhulang.com/css/layout.css",false)[0],p+"layout.css");

SaveText(gettxt("http://www.zhulang.com/css/mulubook.css",false)[0],p+"mulubook.css");

}

}catch(e){

"loading".innerHTML+="<br>保存[<fontcolor=#E98D00>小说目录</font>]<fontcolor=red>失败</font>!"

}

}

vardownurl;

if(bo==2||bo==3||bo==5)

downurl=newurl+document.all.list[downlist[n]].value+".htm";

elseif(/[4789]/.test(bo))

downurl=newurl+document.all.list[downlist[n]].value+".html";

elseif(bo==1)

downurl=newurl+document.all.list[downlist[n]].value.split("|")[0]+".txt";

elseif(bo==6)

downurl=newurl+document.all.list[downlist[n]].value

else{

err(1);return;

}

if(document.all.yi.value==0)

{

if("caoshi".getid()==null)return;

"caoshi".getid().innerText=timeout;

clearTime();

thetime=setInterval(function()

{

if(stop===2){zhangting=newArray(7,this);clearTime();return;}

if(stop===1||"caoshi".getid()==null||xmlhttp.readyState==0){clearTime();return;}

if(xmlhttp.readyState<4)

{

if("caoshi".getid().innerText==1)

{

clearTime();

downover(n,3);

}else

"caoshi".getid().innerText=parseInt("caoshi".getid().innerText)-1;

}elseclearTime();

},1000);

}

varstr=gettxt(downurl,document.all.yi.value==0,function()

{

varthestr,r=xmlhttp.readyState;

if(stop===1||r<4)return;

if(obj.book.value!=9)

thestr=gb(xmlhttp.responseBody);

else

thestr=gb2(xmlhttp.responseBody);

clearTime();

if(r!=4||thestr==null||thestr=="")

{

newpic=newArray();

downover(n,2);

}else{

newpic=getpic(thestr,p,n);

editzhang(thestr,n,newpic.length,p);

}

return;

},obj.book.value);

if(obj.yi.value==1)

{

if(typeof(str)!="object"){downover(n,2);return;}

newpic=getpic(str[0],p,n);

editzhang(str[0],n,newpic.length,p);

}

}

//处理章节

functioneditzhang(str,n,l,path)

{

varname,rre;

clearTime();

if(stop!==0)

{

if(stop==2)zhangting=newArray(2,str,n,l,path);

return;

}

if(obj.book.value==6)

{

rre=/<scriptsrc=(http://w+.cmfu.com//?books/d+/d+.txt)></script>/i

if(str.match(rre)!=null)

{

ss=gettxt(RegExp.$1,false);

if(typeof(ss)=="object")

str=str.replace(rre,ss[0].substring(16,ss[0].length-5))

}

}

if(obj.fan.value!=0)str=convert(obj.fan.value,str);

if(cl1==cl2||cl2==null){cl1=null;cl2=null;}

elseif(cl1>cl2)cl1--;

elsecl1++;

if(l!=0)str=str.replace(there,function(a,b){return"<imgsrc='"+b.replace(/^.+//,"")+"'";});

switch(parseInt(obj.book.value))

{

case1:

str=cmf(str,document.all.list[downlist[n]],document.all.list[parseInt(downlist[n])+1],document.all.list[downlist[n]-1],downlist[n]);

break;

case2:str=paf(str);break;

case3:str=xhf(str);break;

case4:str=shif(str);break;

case5:str=f79(str);break;

case6:str=xnf(str);break;

case7:str=mx9(str);break;

case8:str=cwf(str);break;

case9:str=zhuf(str);break;

default:err(1);return;

}

if(obj.txt.checked)

{

str=txtf(str);

h="txt";

}elseif(obj.wap.checked){

str=wapf(str);

h="wml";

}else{

h="htm"

}

if(obj.book.value==1)

name=path+document.all.list[downlist[n]].value.split("|")[0]+"."+h;

else

name=path+document.all.list[downlist[n]].value+"."+h;

try{

SaveText(str,name);

document.all.list[downlist[n]].checked=false

dxing=dxing.replace(eval("/,"+downlist[n]+"(,|$)/"),"$1")

}catch(hh){

"loading".getid().innerHTML+"<br>保存[<fontcolor=#E98D00>"+menulist[downlist[n]].innerHTML.replace(/^<.*?>/,"")+"</font>]<fontcolor=red>失败</font>!"

}

if(l==0){

downover(n);

}else{

if(obj.yi.value==1)

setTimeout(function(){pic(0);},10);

else

pic(0);

}

}

//采集系统

functiongettxt(url,f,onReady,b)

{

xmlhttp.abort();

try{

if(f)

xmlhttp.onreadystatechange=onReady;

xmlhttp.open("GET",url,f);

xmlhttp.send();

if(f)return;

if(xmlhttp.readyState!=4){return"f";}

varstr=newArray()

if(b==9)

str[0]=gb2(xmlhttp.responseBody);

else

str[0]=gb(xmlhttp.responseBody);

xmlhttp.abort();

returnstr;

}catch(e){

return"f";

}

}

//判断是否有图片

functiongetpic(str,p,n)

{

varbo=parseInt(obj.book.value);

if(bo<4||bo>7||!document.all.dp.checked)returnnewArray();

vararr,ss,re=newRegExp(there);

while((arr=re.exec(str))!=null)

{

if(bo==7)

newpic.push("http://www.mx99.com"+arr[1])

elseif(bo==5)

{

if(arr[1].replace("front.gif","").length==arr[1].length)

newpic.push("http://www.79wx.net"+arr[1])

}else

newpic.push(arr[1])

}

if(newpic.length>0)newpic.push(p,n)

returnnewpic;

}

//采集图片

functionpic(k)

{

if(stop!==0)

{

if(stop==2)zhangting=newArray(3,k);

return;

}

if(newpic[newpic.length-1]==jin.rows[1].cells[0].innerText.match(/(d*)?//)[1])return;

vardownobj="DownImg".getid();

if(k>newpic.length-3)

{

downover(newpic[newpic.length-1])

return;

}

adderr(0,newpic[k].replace(/^.*//,""));

if(document.all.picdown.checked)

{

if("caoshi".getid()==null)return;

"caoshi".getid().innerText=timeout;

clearTime();

thetime=setInterval(function()

{

if(stop===2){zhangting=newArray(8,this);clearTime();return;}

if(stop===1||"caoshi".getid()==null||(downobj.Ready==0&&xmlhttp.readyState==0)){clearTime();return;}

if((xmlhttp.readyState<4&&xmlhttp.readyState!=0)||(downobj.Ready<4&&downobj.Ready!=0))

{

if("caoshi".getid().innerText==1)

{

clearTime();

downobj.Abort();

adderr(4)

pic(++k);

}else

"caoshi".getid().innerText=parseInt("caoshi".getid().innerText)-1;

}elseclearTime();

},1000);

}

if(document.all.book.value!=6)

{

downpic(k);return;

}else{

downobj.DownImgOk=function()

{

if(downobj.Ready==4&&downobj.Data!=null)

{

try{

SaveFile(downobj.Data,newpic[newpic.length-2]+newpic[k].replace(/^.*//,""));

}catch(h){

adderr(2,h.description)

}

}else

adderr(3);

if(obj.yi.value==0)

pic(++k);

else

setTimeout(function(){pic(++k);},10);

}

downobj.GetFile(newpic[k],document.all.picdown.checked);

}

return;

}

当前1/2页12下一页阅读全文

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新hta学习
    热门hta学习
    脚本专栏子分类