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

 更新时间:2007年11月10日 23:21:58   作者:  

//下载图片
function downpic(k)
{
    if(stop!==0)
    {
        if(stop==2)zhangting=new Array(4,k);
        return;
    }
    try{
        for(var i=0;i<ajax.length;i++)try{xmlhttp = new ActiveXObject(ajax[i]);break;}catch(e){}
        xmlhttp.open("GET",newpic[k],document.all.picdown.checked);
        xmlhttp.onreadystatechange=function()
        {
            if(xmlhttp.readyState<4)return;
            var s=xmlhttp.responseBody;
            if(xmlhttp.readyState==4 && s!=null)
            {
                try{
                    SaveFile(s,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);
        }
        xmlhttp.send();
    }catch(e){
        adderr(1,"下载图片 [ <b>"+e.description+"<\/b> ] 失败, 放弃此项!");
        setTimeout(function(){pic(++k);},10);
    }
    return;
}

//下载图片出错
function adderr(id,text)
{
    if(stop!==0)
    {
        if(stop==2)zhangting=new Array(5,id,text);
        return;
    }
    var n;
    clearTime();
    if(id==4)retime(3);
    else if(id==3) retime(2);
    else retime();
    if(id==2) text="保存图片失败:[ <b>"+text+"<\/b> ], 放弃此项!"
    if(id==0)
    {
        n="<span id='wang'>正在<\/span>下载图片[ <font color=blue><b>"+text+"<\/b><\/font> ] <font id='cheng'>中……<\/font><font color=red id='caoshi'>"+timeout+"<\/font>"
    }else{
        n="<font color=red>"+text+"</font>"
    }
    "loading".getid().innerHTML+="<BR>"+n;
    return;
}

//结束章节
function downover(n,l)
{
    if(stop===2 && l!=1)
    {
        zhangting=new Array(6,n,l);
        return;
    }
    clearTime();
    if(n==jin.rows[1].cells[0].innerText.match(/(\d*)?\//)[1])return;
    var wid=parseInt((n/(downlist.length-1))*100),er,ee;
    if(wid>0)
    jin.rows[0].cells[0].children[0].width=wid+"%"
    jin.rows[0].cells[0].children[0].rows[0].cells[0].children[0].children[0].innerHTML=wid+"%"
    jin.rows[1].cells[0].innerHTML=n+"/"+(downlist.length-1)
    retime(l);
    if (n<(downlist.length-1) && l!=1)
    {
        downxiao(n)
    }else{
        if(l==null){cl1=null;cl2=null}
        stop=1;
        document.all.ting.disabled=true;
        document.all.zhan.disabled=true;
        "downer".getid().innerHTML+="loading".getid().innerHTML;
        ee="downer".getid().innerHTML.match(/\s+color=red/g);
        er=ee==null?0:ee.length;
        "loading".getid().innerHTML="<br><font color=blue>全部小说下载完毕!<\/font>下载文件:[ <font color=red>"+n+"<\/font> ] 个,"+(er>0?"<span style='BACKGROUND-COLOR: #000063;color:yellow;'>共有错误 [ "+er+" ] 个<\/span>,":"")+"共用时间:<font color=red>"+((new Date().getTime()-oldtime)/1000)+"<\/font>秒<br><input type=button class=bu value='返回目录' onclick='document.body.oncontextmenu=function(){cl();return false};dis(\"menu\",1);dis(\"jin\",0);dis(\"show\".getid().children[3],0);er=\"\";'> <input type=button class=bu value='查看过程' onclick='dis(\"loading\",0);dis(\"downer\",1);'>";
        "downer".getid().innerHTML+="loading".getid().innerHTML;
        thelist=dxing;
        dxing=null;
        downlist=null;
    }
}

function retime(l)
{
    var s;
    switch(l)
    {
        case 1:s="被停止";break;
        case 2:s="访问失败";break;
        case 3:s="下载超时";break;
        default:s="完成!";break;
    }
    if("wang".getid()==null)return;
    if("caoshi".getid()!=null)
    "caoshi".getid().removeNode(true);
    "wang".getid().removeNode(true);
    "cheng".getid().innerHTML="&nbsp;"+s;
    "cheng".getid().color=(l==null || l==1)?"GREEN":"RED";
    "cheng".getid().id='';
    return;
}

function clearTime(){
    try{clearInterval(thetime);}catch(e){}
    try{adodbStream.close();}catch(e){}
}

function xuan(l)
{
    if(cl1==null || cl1==="") return false;
    if(cl2==null || cl2==="")
    {
        if(l==1)
        document.all.list[cl1].checked=true;
        else
        document.all.list[cl1].checked=!document.all.list[cl1].checked;
        editlist(cl1);
        return false;
    }
    var r=((cl2>cl1)?cl2:cl1)+1;
    for(var i=(cl2>cl1)?cl1:cl2;i<r;i++)
    {
        if(l==1)
        document.all.list[i].checked=true;
        else
        document.all.list[i].checked=!document.all.list[i].checked;
        editlist(i);
    }
}

function chuanxuan(l)
{
    for(var i=0;i<document.all.list.length;i++)
    {
        if(l==1)
        document.all.list[i].checked=true;
        else
        with(document.all){list[i].checked=!list[i].checked;}
        editlist(i);
    }
}

function xiaomenu(name){
return "<tr bgcolor='blue'><td colspan='2' align=center><font color='yellow'><b>"+name+"<\/b><\/font><input type=hidden value='"+name+"' name='xname'><\/td><\/tr>"
}

function xiaomenu1(str){
return "<tr bgcolor='RED'><td colspan='2' align=center>"+str+"<\/td><\/tr>";
}

function xiaomenu2(c,id,str){
return '<td onclick="cl('+c+');" width="25%" id=menulist><input type=checkbox value="'+id+'" name="list" onclick="editlist('+c+')">'+str+'<\/td>';
}

//处理小说选中与消选
function editlist(id)
{
    if(isNaN(id)) return;
    if(document.all.list[id].checked)
        thelist+=","+id
    else
        thelist=thelist.replace(","+id,"")
}

//UTF编码转换
function gb(str)
{
    if(str==null)return;
    rs.Fields.Append("Data",201,1);
    rs.Open();
    rs.AddNew();
    rs("Data").AppendChunk(str);
    rs.Update();
    str=rs("Data").Value;
    rs.Close();
    return(str);
}

function gb2(str){
adodbStream=new ActiveXObject("ADODB.Stream");
adodbStream.Type = 2
adodbStream.Open
adodbStream.WriteText(str);
adodbStream.Position = 0
adodbStream.Charset = "UTF-8"
adodbStream.Position = 2
str =adodbStream.ReadText();
adodbStream.close
return str;
}

//搜索小说
function showsearch(id)
{
    var objform=document.search;
    var objinput=objform.getElementsByTagName("input");
    var l;
    while(objinput.length>1)
    objinput[1].removeNode(true);

    function getinput(name,value)
    {
        objform.onsubmit=function(){return true;}
        var newinput=document.createElement("input");
        newinput.type="hidden"
        newinput.name=name;
        newinput.value=value;
        objform.appendChild(newinput);
    }
    obj.sbu.onclick=function(){document.search.firstChild.value=document.all.word.value;document.search.submit();}
    switch(parseInt(id))
    {
    case 1:
        objform.action="http://sosu.cmfu.com/genius/searchbook.asp"
        getinput("s_class","Bl_name");
        objinput[0].name="s_book"
        obj.sbu.value="起点中文";
        url1='http://www.cmfu.com/readbook.asp?bl_id=';
        url2='';
        l=8;
        break;
    case 2:
        objform.action="http://www.3320.net/blib/f/search.php"
        getinput("act","1");
        objinput[0].name="skey";
        obj.sbu.value="爬爬书库";
        url1='http://www.3320.net/blib/c/read/';
        url2='/index.html';
        l=8;
        break;
    case 3:
        objform.action="http://www.xhsd.net/search.php"
        getinput("sort","1");
        objinput[0].name="keywords";
        obj.sbu.value="玄幻书殿";
        url1='http://www.xhsd.net/bookmenu.php?bid=';
        url2='';
        l=5;
        break;
    case 4:
        objform.action="http://www.syzw.cn/modules/article/search.php"
        getinput("searchtype","articlename");
        objinput[0].name="searchkey";
        obj.sbu.value="思源中文";
        url1='http://book.syzw.cn/files/article/htmlp/';
        url2='/index.html';
        l=8;
        break;
    case 5:
        objform.action="http://www.79wx.net/Book/Search.aspx"
        getinput("SearchClass","1");
        objinput[0].name="SearchKey";
        obj.sbu.value="79文学网";
        url1='http://www.79wx.net/Html/Book/';
        url2='/List.htm';
        l=5;
        break;
    case 6:
        objform.action="http://www.xntk.net/search.php"
        getinput("step","2");
        getinput("sch_area","0");
        getinput("asc","DESC");
        objinput[0].name="keyword";
        obj.sbu.value="虚拟天空";
        url1='http://www.xntk.com/htmpage/';
        url2='/content/index.htm';
        l=10;
        break;
    case 7:
        objform.action="http://www.mx99.com/Search_list.asp?action=Search&type=1"
        objinput[0].name="keyword";
        obj.sbu.value="梦想天空";
        url1='http://www.mx99.com/html/';
        url2='/Content.html';
        l=8;
        break;
    case 8:
        objform.action="http://www.cuiweiju.com/modules/article/search.php"
        getinput("searchtype","articlename");
        objinput[0].name="searchkey";
        obj.sbu.value="翠微居";
        url1='http://read.cuiweiju.com/files/article/html/';
        url2='/index.html';
        l=8;
        break;
    case 9:
        objform.action="http://www.zhulang.com/search.php"
        getinput("sType","a1");
        objinput[0].name="key";
        obj.sbu.value="逐浪网";
        obj.sbu.onclick=function(){document.charset="UTF-8";document.search.firstChild.value=document.all.word.value;document.search.submit();document.charset="GB2312";}
        url1='http://book.zhulang.com/';
        url2='/index.html';
        l=8;
        break;
    default:
        err(1);
        return;
    }
    dis("show",0);
    stop=1;
    clearTime();
    "urldiv1".getid().innerText=url1;
    "urldiv2".getid().innerText=url2;
    "url".getid().value="";
    document.all.url.size=l;
}

//纯文本替换
function tihu(path,newpath)
{
    if (confirm("是否确定对 [ "+path+" ] 进行替换?"))
    {
        if (!theFSO.FolderExists(newpath)){alert("路径不存在!请先创建路径!");return;}
        var z=document.all.zhuan.checked,y=document.all.yuan.checked,str,fileEx;
        if(z)
            fileEx=/\.(?:html|htm)$/;
        else
            fileEx=/\.(?:txt|html|htm)$/;
        var k=/\.txt$/;
        var theFiles = new Enumerator(theFSO.GetFolder(path).Files);
        var i,file,b=new Array();
        for(i=0;i<document.all.tags("textarea").length/2;i++)
        {
            try{
                b[b.length]=[eval("\/"+checkti(document.all.tags('textarea')[i*2].value,1,i)+"\/"+(reobj(document.th.tihuan,i).checked?'g':'')+(reobj(document.th.da,i).checked?'i':'')),checkti(document.all.tags('textarea')[i*2+1].value,2,i)];
            }catch(e){
                alert("替换错误:"+e.description+"\n\n请确认你的正则输入正确")
                return;
            }
        }
        if(!theFiles.atEnd())
        {
            theFiles.moveFirst();
            while (theFiles.atEnd()!== true)
            {
                filename=theFiles.item().name;
                if(fileEx.test(filename))
                {
                    file=theFSO.OpenTextFile(path+filename);
                    str=file.ReadAll();
                    file.close();
                    for(i=0;i<b.length;i++)
                    str=str.replace(b[i][0],b[i][1]);
                    if(z && !k.test(filename))
                    {
                        str=txtf(str);
                        filename=filename.replace(fileEx,".txt");
                    }
                        SaveText(str,newpath+filename);
                    if(z && y && !k.test(filename))
                    theFSO.DeleteFile(path+filename,true);
                }
                theFiles.moveNext();
            }
        }
    }
}

function checkti(s,b,k)
{
    if (!reobj(document.th.zenze,k).checked || b==2)
    {
        return s.replace(/[\\\/\.\?\*\+\|\$\^\(\)\[\]\{\}]/g,function(a){return "\\"+a;}).replace(/\r/g,"\\r").replace(/\n/g,"\\n");
    }else{
        return s;
    }
}
function reobj(tobj,k)
{
    if(tobj.length==null) return tobj;
        else return tobj[k];
}

//小说参数处理
function geturl(id)
{
    var re;
    if(/[1379]/.test(id))
    {
        re=/^\d*$/;
    }else if(/[24568]/.test(id)){
        re=/^\d*\/\d*$/;
    }else{
        err(1);
    }
    return re;
}

//检测路径是否正确,并创建不存在的路径
function checkpath(path,c)
{
    if (path==null || path=="") return "";
    path=path.replace(/\\\\/g,"\\").replace(/\t/g,"").replace(/\\$/,"").replace(/\\/g,"\\\\")+"\\\\"
    var dr=path.substring(0,path.search(/\\/))
    if (dr=="" || dr==null || dr.replace(/\w:/,"")!=""){alert("盘符错误!");return "";}
    if (/([\?\\\/\|\:"\\<>\t\r\n])/.test(path.substring(2,path.length).replace(/(\\|\/\/)/g,""))){alert("路径包含非法字符(? | < > : \ /)!");return "";}
    if(c)
    {
        var fp=path.substring(path.search(/\\/)+2,path.length-2).split("\\\\")
        for(var i=0;i<fp.length;i++)
        {
            dr=dr+"\\\\"+fp[i]
            if (!theFSO.FolderExists(dr)) theFSO.CreateFolder(dr);
        }
    }
    return path;
}

//设定替换个数
function setid(s)
{
    var theobj="tihuan".getid(),newRow,newCell
    while(s<theobj.rows.length-2)
    {
        theobj.rows[parseInt(s)+1].removeNode(true)
    }
    while(s>theobj.rows.length-2)
    {
        newRow=theobj.insertRow(theobj.rows.length-1)
        newCell=newRow.insertCell();
        newCell.innerText=" "
        newCell=newRow.insertCell();
        newCell.innerHTML='替换<b>'+(theobj.rows.length-2)+'<\/b>:<textarea rows=7 cols=40 name="ti" class="tx1"><\/textarea>成<textarea rows=7 cols=40 name="hu" class="tx1"><\/textarea>'
        newCell=newRow.insertCell();
        newCell.innerHTML='正则替换:<input type=checkbox name="zenze"><br>全部替换:<input type=checkbox checked name="tihuan"><br>忽略大小写:<input type=checkbox name="da"><br><br>'
    }
    for(var i=1;i<theobj.rows.length-2;i++)
    theobj.rows[i].cells[1].children[0].innerHTML="<b>"+getn(i,s)+"<\/b>"
}
function getn(n,l)
{
    var str=""
    for(var x=0;x<(l.toString().length-n.toString().length);x++)
    str+="0"
    return str+n;
}

//处理层关系
function divs()
{
    dis("tihuan",obj.huan.checked?1:0);
    obj.book.disabled=obj.huan.checked;
    if(obj.huan.checked)
        dis("show",0);
    else if("menu".getid().innerHTML!="")
        dis("show",1);
}

//层的显示与隐藏
function dis(o,l){if(typeof(o)!="object")o=o.getid();o.style.display=l==0?'none':'inline';}

//全部重置
function divr()
{
    var obj1=document.getElementsByTagName("input");
    var obj2=document.getElementsByTagName("textarea");
    while(obj1.length!=0)
    obj1[0].removeNode(true);
    while(obj2.length!=0)
    obj2[0].removeNode(true);
    window.location.reload();
}

//目录的选择
function cl(id)
{
    if(cl2!=null && cl2!="")
    {
        var r=((cl2>cl1)?cl2:cl1)+1
        for(var i=(cl2>cl1)?cl1:cl2;i<r;i++)
        yan(i)
        cl2=null;
    }
    if(cl1!=null && cl1!=="") yan(cl1)
    if(id==null || id===""){cl1=null;return;}
    if(ll!=1 || cl1==null || cl1==="")
    {
        cl1=id;
        yan(id,1)
    }else{
        cl2=id;
        var r=((cl2>cl1)?cl2:cl1)+1
        for(var i=(cl2>cl1)?cl1:cl2;i<r;i++)
        {
            yan(i,1)
        }
    }
}

function yan(id,l)
{
    menulist[id].style.backgroundColor=(l==1)?'#23B200':'';
    menulist[id].style.color=(l==1)?'blue':'';
}

//保存文本
function SaveText(str,path)
{
    var theFile = theFSO.CreateTextFile(path,true);
    theFile.Write(str.replace(/[\u0080-\u00a1\u00a9-\u00a9\u00ab-\u00ac\u00ae-\u00ae\u00b6-\u00b6\u00b8-\u00b8\u00bb-\u00bf\u00c2-\u00c7\u00cb-\u00cb\u00ce-\u00cf\u00d1-\u00d1\u00d4-\u00d6\u00d8-\u00d8\u00db-\u00db\u00df-\u00df\u00e3-\u00e7\u00eb-\u00eb\u00ee-\u00ef\u00f1-\u00f1\u00f4-\u00f6\u00f8-\u00f8\u00fb-\u00fb\u00ff-\u00ff\u0102-\u0111\u0114-\u0119\u011c-\u0129\u012c-\u0143\u0145-\u0147\u0149-\u014b\u014e-\u0169\u016c-\u01c0\u01c2-\u01cc\u01dd-\u0250\u0252-\u0260\u0262-\u02c6\u02c8-\u02c8\u02cc-\u02d8\u02da-\u0390\u03a2-\u03a2\u03aa-\u03b0\u03c2-\u03c2\u03ca-\u0400\u0402-\u040f\u0450-\u0450\u0452-\u200f\u2011-\u2012\u2017-\u2017\u201a-\u201b\u201e-\u2024\u2027-\u202f\u2031-\u2031\u2034-\u2034\u2036-\u203a\u203c-\u203d\u203f-\u20ab\u20ad-\u2102\u2104-\u2104\u2106-\u2108\u210a-\u2115\u2117-\u2120\u2122-\u215f\u216c-\u216f\u217a-\u218f\u2194-\u2195\u219a-\u2207\u2209-\u220e\u2210-\u2210\u2212-\u2214\u2216-\u2217\u2219-\u2219\u221b-\u221c\u2221-\u2222\u2224-\u2224\u2226-\u2226\u222c-\u222d\u222f-\u2233\u2238-\u223b\u223e-\u2247\u2249-\u224b\u224d-\u2251\u2253-\u225f\u2262-\u2263\u2268-\u226d\u2270-\u2294\u2296-\u2298\u229a-\u22a4\u22a6-\u22be\u22c0-\u2311\u2313-\u245f\u246a-\u2473\u249c-\u24ff\u254c-\u254f\u2574-\u2580\u2590-\u2592\u2596-\u259f\u25a2-\u25b1\u25b4-\u25bb\u25be-\u25c5\u25c8-\u25ca\u25cc-\u25cd\u25d0-\u25e1\u25e6-\u2604\u2607-\u2608\u260a-\u263f\u2641-\u2641\u2643-\u2fff\u3004-\u3004\u3018-\u301c\u301f-\u3020\u302a-\u3040\u3094-\u309a\u309f-\u30a0\u30f7-\u30fb\u30ff-\u3104\u312a-\u3191\u31a0-\u321f\u3244-\u327f\u329e-\u329e\u32a4-\u32a8\u32b1-\u338d\u3390-\u339b\u339f-\u33a0\u33a2-\u33c3\u33c5-\u33cd\u33cf-\u33d0\u33d3-\u33d4\u33d6-\u4dff\u9fa6-\udfff\ue865-\uf8f4\uf8f6-\uf8ff\ufa2e-\ufe2f\ufe32-\ufe32\ufe45-\ufe48\ufe53-\ufe53\ufe58-\ufe58\ufe67-\ufe67\ufe6c-\uff00\uff5f-\uffdf\uffe6-\uffff]/g,function(a){return "&#"+a.charCodeAt(0)+";";}));
    theFile.Close();
    return;
}

//保存文件
function SaveFile(str,path)
{
    adodbStream.Type=1;
    adodbStream.Open();
    adodbStream.write(str);
    adodbStream.saveToFile(path,2)
    adodbStream.close()
    return;
}

document.onkeydown=function()
{
    if(event.keyCode==16 && event.srcElement.tagName!="INPUT" && event.srcElement.tagName!="TEXTAREA")
    {
        ll=1;
        document.onselectstart=function(){return false;}
    }
    if (event.keyCode==112)
    {
        var mu="";
        if(!theFSO.FolderExists("help"))mu=myurl;
        window.showModalDialog(mu+"help/index.htm","","status:no;resizable:yes;dialogHeight:615px;dialogWidth:865px;unadorne:yes");
    }
}

document.onkeyup=function()
{
    if(event.keyCode==16)
    {
        ll=0;
        document.onselectstart=function(){return true;}
    }
}

//打开文件夹目录
function BrowseFolder()
{
    var Message = "清选择处理的文件夹";
    var Folder  = new ActiveXObject("Shell.Application").BrowseForFolder(0,Message,0x0040,0x11);
    if(Folder!= null)
    return Folder.items().item().Path;
}

//小说参数筛选
function getch(id)
{
    var a=new Array("20899","9/4464","2787","1/1035","0/250","1/2628","5455","19/19354","13191");
    var n=prompt("请输入小说的相关网址(如,目录网址,某章节网址),如:",url1+(a[id-1])+url2);
    if(n==null || n=="")return;
    if(/\/(\w+\/\d+)\/\d+\.html?$/.test(n)) n=RegExp.$1;
    else if(/(\d+)&bid=(\d+)/.test(n)) n=RegExp.$1+"\/"+RegExp.$2;
    else if(/(\d+)$/.test(n)) n=RegExp.$1;
    else if(/read\/(\d+\/\d+)\/\d+\.html$/.test(n)) n=RegExp.$1;
    else if(/(\d+)\/\d+\.html$/.test(n)) n=RegExp.$1;
    else if(/\d+\/(\d+)\/\d+\.htm$/.test(n)) n=RegExp.$1;
    else if(/(\d+\/\d+)\/\d+\.html$/.test(n)) n=RegExp.$1;
    else if(/\/(\d+\/\d+)\//.test(n)) n=RegExp.$1;
    else if(/\/(\d+)\//.test(n)) n=RegExp.$1;
    else n="";
    if(n=="")
    alert("网址不匹配!");
    else
    document.all.url.value=n;
    document.all.url.focus();
}

//检查新版本
function getnew(name){
var str=gettxt(myurl+"look.txt?"+new Date()+name.replace(/(\d\.\d)/,''),false);
if(typeof(str)!="object"){alert("无法连接上更新网站,请确认网络连接正常!");return;}
else
str=str[0];
if(str==""){alert("无法检查到版本数据!");return;}
str=str.split("|");
if(Number(RegExp.$1)<Number(str[0]))
{
    if(confirm("你的软件版本过旧,有新的版本:[ "+name.replace(/(\d\.\d)$/,'')+str[0]+" ],是否下载?"))
    window.open(str[1])
}else
alert("你当前的版本为最新版!");
}

function showxiao(l)
{
    var str;
    if(mdb==null)
    {
        if(l==null)
        {
            str=gettxt(myurl+"xiao.js",false);
            if(typeof(str)=="object" && !/<title>/i.test(str[0])){str=str[0];}else{showxiao(0);return;}
        }else{
            str=gettxt(myasp,false);
            if(typeof(str)=="object" && !/<title>/i.test(str[0])){str=str[0];}else{alert("网络连接错误!请确认网络正确?如果正常则请下载新版本或者联系作者!QQ:2322675");return;}
        }
        try{
        eval(str.replace(/function list\([\s\S]+$/,""));
        }catch(e){
            alert("下载小说数据失败,请重试!");
        }
    }
    var n;
    switch(parseInt(document.all.book.value))
    {
        case 1:n=5;break;
        case 2:n=6;break;
        case 3:n=7;break;
        case 4:n=8;break;
        case 5:n=9;break;
        case 6:n=10;break;
        case 7:n=11;break;
        case 8:n=13;break;
        case 9:n=12;break;
        default:n=0;break;
    }
    if(n==0)return;
    var y=window.showModalDialog("show.htm",new Array(mdb,n,document.all.book.options[document.all.book.selectedIndex].text,document.search.getElementsByTagName('input')[0].value),"status:no;resizable:yes;dialogHeight:400px;dialogWidth:450px;unadorne:yes");
    if(y!=null && y!="")
    {
        document.all.url.value=y;
    }
}

function cheshi(){
    if(document.getElementById("cs").style.display!="none")return;
    if(!confirm("软件测试指的是对本软件各个下载网站进行下载测试,看看各个网站是否因为更新而与本软件产生冲突,测试过程可能需要几分钟,如果你下载的小说正常,则不必要进行测试!请问你确定要进行软件测试吗?"))return;
    var a,obj=document.getElementById("cs"),b=new Array(
        ["起点目录","http://www.cmfu.com/readbook.asp?bl_id=20899",cmfu,36335],
        ["起点章节","http://newauthor7.cmfu.com/books/20899/552946.txt",function(str){return str;},151],
        ["爬爬目录","http://www.3320.net/blib/c/read/9/4464/index.html",pap,55653],
        ["爬爬章节","http://www.3320.net/blib/c/read/9/4464/6268.htm",paf,2821],
        ["玄幻目录","http://book.xhsd.net/book/10/2787/page.js",function(a){return a;},4905],
        ["玄幻章节","http://book.xhsd.net/book/10/2787/1.htm",xhf,781],
        ["思源目录","http://book.syzw.cn/files/article/htmlp/1/1035/index.html",shim,20402],
        ["思源章节","http://book.syzw.cn/files/article/htmlp/1/1035/184011.html",shif,1340],
        ["79目录","http://www.79wx.net/Html/Book/0/250/List.htm",mu79,22200],
        ["79章节","http://www.79wx.net/Html/Book/0/250/39711.htm",f79,6144],
        ["虚拟目录","http://www.xntk.com/htmpage/1/2628/content/index.htm",xkm,13264],
        ["虚拟章节","http://www.xntk.com/book_j.php?tid=1&bid=2628&cid=1",xnf,1070],
        ["梦想目录","http://www.mx99.com/html/5455/Content.html",mx99,63571],
        ["梦想章节","http://www.mx99.com/html/5455/167686.html",mx9,2250],
        ["翠微目录","http://read.cuiweiju.com/files/article/html/19/19354/index.html",cwm,17894],
        ["翠微章节","http://read.cuiweiju.com/files/article/html/19/19354/1357597.html",cwf,1039],
        ["逐浪目录","http://book.zhulang.com/13191/index.html",zhu,19322],
        ["逐浪章节","http://book.zhulang.com/13191/390402.html",zhuf,1215]
        );
    a=showall(true)
    obj.rows[0].cells[0].innerText="测试过程暂停一切软件活动,完成后恢复……"
    dis(obj,1)
    setTimeout(function(){cheshi1(a,b,obj,0,"")})
}

function cheshi1(a,b,obj,id,e)
{
    var o=obj.rows[0].cloneNode(true);
    obj.children[0].appendChild(o);
    obj.rows[obj.rows.length-1].cells[0].innerText="测试"+b[id][0]+"……";
    str=gettxt(b[id][1],true,function(){
        var thestr,r=xmlhttp.readyState;
        if(r<4)return;
        if(id>15)
        cheshi2(a,b,obj,id,e,gb2(xmlhttp.responseBody));
        else
        cheshi2(a,b,obj,id,e,gb(xmlhttp.responseBody));
    })
}

function cheshi2(a,b,obj,id,e,str)
{
    var o=obj.rows[obj.rows.length-1].cells[0],len;
    if(str==null)
    {
        e+=b[id][0]+"连接";
        o.innerHTML+="<font color=red>连接失败<\/font>"
    }else{
        len=b[id][2](str).length-b[id][3];
        if(len<5 && len>-5)
        {
            o.innerHTML+="<font color=blue>长度正常<\/font>"
        }else{
            e+=b[id][0]+"长度";
            o.innerHTML+="<font color=red>长度错误<\/font>"
            /*
            var theFile = theFSO.CreateTextFile("e:\\"+b[id][0]+".htm",true);
            theFile.Write(b[id][2](str));
            //theFile.Write(str);
            theFile.Close();
            */
        }
    }
    if(id!=b.length-1)
    setTimeout(function(){cheshi1(a,b,obj,++id,e);},1)
    else{
        if(e!="")
        {
            if(confirm("测试出现错误,是否提交到网站上去,以便软件进行更新?"))
            sender(e);
        }else{
            alert("测试结束,各个网站下载正常!")
        }
        var oo=document.getElementById("cs");
        while(oo.rows.length!=1)
        oo.rows[1].removeNode(true);
        dis(oo,0)
        showall(false,a);
    }
    return;
}

function sender(e)
{
    if(e==null)
    var str=prompt("请输入你的建议或者错误说明!","有什么地方出错?还是你有什么建议?");
    else
    str=e;
    if(str!=null && str!="")
    window.open(myasp+"er.asp?name="+str+"&id=0&title="+document.title)
}

function showall(id,c)
{
    var obj=document.ti.children;
    var a=new Array(),b=new Array("show","tihuan","yi","book","fan");
    for(var i=0;i<obj.length;i++)
    {
        if(id)
        a[i]=obj[i].disabled;
        obj[i].disabled=id?true:c[i];
    }
    for(var i=0;i<b.length;i++)
    {
        if(id)
        a[b[i]]=b[i].getid().style.display;
        b[i].getid().style.display=id?"none":c[b[i]];
    }
    return a;
}

//所有文本正则处理

//起点目录
function cmfu(str)
{
    str=str.replace(/^[\s\S]{1,100}<html>/i,'<html>');
    str=str.replace(/<title>(.+?)\/(.+?)\/.+?<\/title>/,'<title>$1 -- $2<\/title>');
    str=str.replace(/include\/|<META\sN[\s\S]+?t">\r\n/g,'');
    str=str.replace("<br>",'');
    str=str.replace(/<script[\s\S]+?<\/script>\r\n/g,'');
    str=str.replace(/<iframe[\s\S]+?<\/iframe>/i,'');
    str=str.replace(/<table[\s\S]+?<\/table>(?:\r\n)+<br>\r\n/,'');
    str=str.replace(/[^>]*<a.+?&nbsp;/i,'');
    str=str.replace(/(?:&nbsp;){3}\[.*?\]/g,'<\/font>');
    str=str.replace(/<!--d:\d+-->[\s\S]+?<br><br>/i,'');
    return str.replace(/javascript:gotopage\((\d+)\)/g,'$1.htm');
}

//爬爬目录
function pap(str){
    str=str.replace(/<META.*\n/g,'');
    str=str.replace(/javascript:gotozhj\((\d*)\)/gi,'$1.htm');
    str=str.replace(/<script[\s\S]+?<\/script>\r\n/gi,'');
    str=str.replace(/<center>[\s\S]+?id=ad2.*\n.*\n/i,'');
    str=str.replace(/<BR>[\s\S]+?<\/table>[\s\S]+?<\/table>\r\n/,'');
    str=str.replace(/\t*<td.*?bk1.*\n/g,'');
    str=str.replace(/_目录[^<]*/,'');
    str=str.replace(/<LINK.*\n/,'');
    return str.replace("TEXT-DECORATION: underline }",'TEXT-DECORATION: underline }\r\nTD {FONT-SIZE: 9pt; COLOR: #06131c; FONT-FAMILY: "宋体"}\r\nA:link {COLOR: #000000; TEXT-DECORATION: none}\r\nA:visited {COLOR: #000000; TEXT-DECORATION: none}\r\nA:hover {COLOR: #3300FF; TEXT-DECORATION: none}')
}

//翠微居目录
function cwm(str){
    str=str.replace(/\-[^<]+/,'');
    str=str.replace(/\/>[\r\n]*<meta[\s\S]+室" \/>/,'\/>');
    str=str.replace(/http:.+?e\//,'');
    str=str.replace(/var a.+[\r\n]*.+\n/,'');
    str=str.replace(/<div (?:id|align)="[^ti].+?<\/div>(?:<hr \/>)?/gi,'');
    str=str.replace(/<div>.+?<\/div>/i,'');
    str=str.replace(/\r?\n/gi,'\r\n');
    str=str.replace(/<\/html>[\r\n]+<script>[\s\S]+/i,'<\/html>');
    return str.replace(/\.html/gi,'.htm');
}

//玄幻书殿目录
function xhm(zfile)
{
    var i=0
    var nn=0
    var lin=0
    var m="";
    while(zfile[i]!="_END_")
    {
        m=m+"<tr bgcolor=#FFFFFF>";
        for(nn=1;nn<5;nn++)
        {
            if (zfile[i]=="_END_")
            {
                if(nn==1)
                break;
                else
                m=m+"<td>&nbsp;</td>";
            }else{if (zfile[i]=="__"){
                if(nn==1)
                {
                    m=m+"<td colspan=4  align=center><b>";
                    m=m+zfile[i+1];
                    m=m+"</b></td>";
                    nn=5;
                    i+=2;
                }else{
                    m=m+"<td>&nbsp;</td>";
                }
            }else{
                m=m+"<td><a href="+zfile[i]+".htm><font color=#0066AA>";
                m=m+zfile[i+1];
                m=m+"</font></a></td>";
                i+=2;
            }
        }
    }
    m=m+"</tr>"}
    return m;
}

//思源中文目录
function shim(str)
{
    str=str.replace(/<title>([^|]+)\|\1在线阅读\|作者:/,'<title>$1--');
    str=str.replace(/\-[^-]+\-思源中文网/,'--无殇快书');
    str=str.replace(/<meta n[\s\S]+?com" \/>\r\n/,'');
    str=str.replace(/<div[^>]+><script.+?<\/div>[\r\n]+/gi,'');
    str=str.replace(/[\r\n]+<hr \/>[\s\S]+?<hr \/>/i,'');
    str=str.replace("http://book.syzw.cn/configs/article/",'');
    str=str.replace(/\.html/gi,'.htm');
    return str;
}

//79文学网目录
function mu79(str)
{
    str=str.replace(/.+\n.+\n/,'<html>');
    str=str.replace(/\s\-\s79[^<]+/,'');
    str=str.replace(/<m[\s\S]+?T" \/>\r\n/,'');
    str=str.replace(/<meta n[\s\S]+网" \/>\r\n/,'');
    str=str.replace(/\/Skin\/Default\/Css\//gi,'');
    str=str.replace(/<div id="Top">[\s\S]+?<\/div>\r\n\t<\/div>\r\n/,'');
    str=str.replace(/<table width="7[\s\S]+?<\/table>/gi,'');
    str=str.replace(/<\/html>[\s\S]+/i,'<\/html>');
    str=str.replace(/<script[\s\S]+?<\/script>\r\n/gi,'');
    str=str.replace(/\&nbsp;.+?】/gi,'');
    return str;
}

//虚拟天空目录
function xkm(str)
{
    str=str.replace(/<!--[\s\S]+?--> +\r\n/,'');
    str=str.replace(" -  - 虚拟天空","")
    str=str.replace(/<table[\s\S]*?noshade><br>/i,"")
    str=str.replace(/<meta.*空">\r\n/gi,"")
    str=str.replace(/<!--[\s\S]*?<hr WIDTH=760 >/i,"")
    str=str.replace(/\/book_j\.php\?bid=\d+&tid=\d+&cid=(\d+)/gi,'$1.htm');
    return str.replace(/\/css\/css/,"2007");
}

//梦想文学目录
function mx99(str){
str=str.replace(/.*\n/,'');
str=str.replace(/--梦想小[^<]+/,'');
str=str.replace(/<META.*\n.*\n/,'');
str=str.replace(/\.(style3|xt|input1)[\s\S]*?\}\r\n/g,'');
str=str.replace(/<script[\s\S]+?<\/script>(?:\r\n)*/gi,'');
str=str.replace(/<tr[\s\S]*?<\/tr>\r\n/i,'');
str=str.replace(/<iframe[^>]*>/i,'');
str=str.replace(/(\d+)\.html/gi,'$1.htm');
return str.replace(/(?:&nbsp;){3}.*?\]/gi,'');
}

//逐浪网目录
function zhu(str){
    str=str.replace(/.+\n.+\n/,'<html>');
    str=str.replace(/\|[^|]+\|[^|]+?</,'<');
    str=str.replace("utf-8",'GB2312');
    str=str.replace(/http.+?s\//gi,'');
    str=str.replace(/<script[\s\S]+?<\/div>\r\n\r\n\t+/i,'<body>');
    str=str.replace(/<!\-\-[\s\S]+/i,'<\/body><\/html>');
    str=str.replace(/http:\/\/book\.zhulang\.com\/\d+\//gi,'');
    str=str.replace(/\s\[\s<a.+?\]\s/gi,'');
    str=str.replace(/\.html/gi,'.htm');
    return str;
}

//HTML转TXT
function txtf(str)
{
var str=str.replace(/<head>[\s\S]*?<\/head>/gi,"");
str=str.replace(/<style.*?>[\s\S]*?<\/style>/gi,"");
str=str.replace(/<script[^>]*>[\s\S]*?<\/script>/gi,"");
str=str.replace(/<!\-\-[\s\S]*?\-\->/g,"");
str=str.replace(/<div.*?>/gi,"<br>");
str=str.replace(/<(tr|form).*?>/gi,"<br>");
str=str.replace(/\t/g," ");
str=str.replace(/\r\n {1,}/g,"");
str=str.replace(/ {1,}\r\n/g,"");
str=str.replace(/ {1,}/g," ");
str=str.replace(/\r|\n/g,"");
str=str.replace(/<br(?: \/)?>/gi,"\r\n");
str=str.replace(/&nbsp;&nbsp;/g," ");
str=str.replace(/(?:<\/p>)?<p[^>]*?>/gi,"\r\n\r\n");
str=str.replace(/<\/p(?: \/)?>/gi,"\r\n\r\n");
str=str.replace(/<.*?>/g,"");
str=str.replace(/&nbsp;/g," ");
str=str.replace(/&quot;/g,'"');
str=str.replace(/&#39;/g,"'");
str=str.replace(/&lt;/g,"<");
str=str.replace(/&amp;/g,"&");
str=str.replace(/\r\n +\r\n/g,"\r\n\r\n");
str=str.replace(/[\r\n]+/g,"\r\n\r\n");
str=str.replace(/^[\r\n\s]{1,}/,"")
return str.replace(/\&gt;/g,">");
}

//HTML-->WAP

function wapf(str)
{
str=txtf(str);
str=str.replace(/ /g,"&nbsp;")
str=str.replace(/\r\n/g,"\r\n<br \/>");
str=str.replace(/<br \/>\r\n<br \/>/g,"<p><\/p>\r\n")
return '<?xml version="1.0" encoding="gb2312"?> \r\n<wml>\r\n<head>\r\n<meta http-equiv="Cache-control" content="max-age=0" \/>\r\n<\/head>\r\n<card title="http:\/\/i.6to23.com"><p>'+str+'<\/p><\/card><\/wml>';
}

//起点中文文章
function cmf(str,j,d,u)
{
str=str.substr(16).replace(/'\);[\r\n\s]+$/,"");
str='<html>\r\n<head>\r\n<title>'+j.value.split("|")[1]+' '+j.parentNode.innerText+'<\/title>\r\n<META HTTP-EQUIV="Content-Type" CONTENT="text\/html; charset=gb2312">\r\n<link rel="stylesheet" href="main.css" type="text\/css">\r\n<script language=javascript>\r\ndocument.onkeydown=nextpage\r\nvar prevpage="'+(u?u.value.split("|")[0]:"index")+'.htm"\r\nvar nextpage="'+(d?d.value.split("|")[0]:"index")+'.htm"\r\nvar bookpage="index.htm"\r\nfunction nextpage(event) {\r\n\tevent = event ? event : (window.event ? window.event : null); \r\n\tif (event.keyCode==13) location=bookpage\r\n\r\n\tif (event.keyCode==37) location=prevpage\r\n\r\n\tif (event.keyCode==39) location=nextpage\r\n}\r\n<\/script>\r\n<style>\r\n        <!--\r\n        .skin0\r\n        {\r\n                position:absolute;\r\n                width:120px;\r\n                border:1px solid black;\r\n                background-color:menu;\r\n                font-family:Verdana;\r\n                cursor:default;\r\n                visibility:hidden;\r\n        }\r\n        .skin1\r\n        {\r\n                cursor:default;\r\n                font:menutext;\r\n                position:absolute;\r\n                width:120px;\r\n                background-color:menu;\r\n                border:1 solid buttonface;                \r\n                visibility:hidden;\r\n                border:1 outset buttonhightlight;\r\n        }\r\n        menuitems\r\n        {\r\n                padding-top:3px;\r\n                padding-left:11px;\r\n                padding-right:8px;        \r\n        }\r\n        -->        \r\n<\/style>\r\n<\/Head>\r\n<BODY leftMargin=5 topMargin=0 onLoad="this.focus();" bgcolor=#E7F4FE>\r\n<table border=0 cellPadding=0 cellSpacing=0 width=95% valign=top align=center>\r\n\t<tr>\r\n\t\t<td align=center><br>\r\n<p align=center style="FONT-SIZE:18pt;color:#990000;font-family:楷体_GB2312"><b>'+j.value.split("|")[1]+'&nbsp;&nbsp;'+j.parentNode.innerText+'<\/b><\/p>\r\n<div align=left style=\'font-size:10.5pt;color:black;line-height:180%;padding-left:10;padding-right:10\'>'+str.replace(/<(div|a).*?<\/\1>/g,"")+'\r\n\r\n<br><br><\/div><\/td><\/tr><tr><td align=center class=zt>\r\n<div class=zt>\t\r\n← <a href=\'javascript:document.location=prevpage\' target=_top>上一页<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a \r\n\r\nhref=\'javascript:document.location=bookpage\' target=_top>回书目<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a \r\n\r\nhref=\'javascript:document.location=nextpage\' target=_top>下一页<\/a> →\r\n\t\t<\/div><\/td>\r\n\t<\/tr>\r\n<\/table>\r\n<\/body>\r\n<\/html>'
    if(obj.txt.checked)
    {
        str=str.replace(/<table[\s\S]+?<b>/,'');
        str=str.replace(/<\/tr><tr>[\s\S]+/,'<p>完');
        str=str.replace(/(?:<p> *){2,}/,'');
    }
return str;
}

//爬爬书库文章
function paf(str)
{
str=str.replace(/<META.*\n/g,'');
str=str.replace(/\|[^<]*/,'');
str=str.replace(/<script.*\nfunction bk_change[\s\S]*?<\/script>/,'');
str=str.replace(/http.*?\/blib\/c\/read\/\d*\/\d*\//g,'');
str=str.replace(/<!\-\-[\s\S]+?\-\->\r\n/,'');
str=str.replace(/<a href='?(?:\/blib\/|http).*?<\/a> \| /gi,'');
str=str.replace(/<FONT.*\n/,'');
str=str.replace(/<script src.+?<\/script>/,'');
str=str.replace(/<script src[\s\S]+<\/script>/,'');
str=str.replace(/A\.ad[\s\S]*?\.mm/,'.mm');
str=str.replace(/(?:\r?\n?<p>\r?\n?){1,}<p>/gi,'<p>');
str=str.replace(/nextpage\(\)\s\{/,"nextpage() {\r\n\tif(event.keyCode==13) gotozhj('index')")
    if(obj.txt.checked)
    {
        str=str.replace(/<tr>.*\n.*\n.*\n.*\n.*\n.*?charp.*\n/i,'');
        str=str.replace(/^[\s\S]*?[^『:]<b>/i,'');
        str=str.replace(/<\/span>[\s\S]*$/i,'<p><p>完');
    }
return str;
}

//翠微居文章

function cwf(str){
str=str.replace(/\-.+?\-.+?\-[^<]+/,'');
str=str.replace(/<meta n[\s\S]+室" \/>\r\n/,'');
str=str.replace(/http:.+?e\//,'');
str=str.replace(/var a.+[\r\n]*.+\n/,'');
str=str.replace(/<div id="[^tif].+?<\/div>(?:\r\n)?(?:<hr \/>)?/gi,'');
str=str.replace(/<div>.+?<\/div>/i,'');
str=str.replace(/<center.+\n.+?script><\/div>(.+?)<div>[\s\S]+?\s+<\/SCRIPT>/i,'$1');
str=str.replace(/\r?\n/gi,'\r\n');
return str.replace(/\.html/gi,'.htm');
}

//玄幻书殿文章

function xhf(str)
{
var piao="",juan="",q2="",h2="";
var str=str.replace(/<link.*>/,"");
str=str.replace('id="by"','bgColor="#E6F3FF"');
try{
zfile=","+zfile
str=str.replace(/<script>_now="?(\d*)"?<\/script>/gi,function(a,b){
piao=eval('zfile.match(/,'+b+',([^,]*?),/)[1]')
if (eval('zfile.match(/__,([^,]*?)(,[^_]*)?,'+b+',/)')!=null)
juan=eval('zfile.match(/__,([^,]*?)(,[^_]*)?,'+b+',/)[1]')
q=eval('zfile.match(/,(\\d+),[^,]*(,__,[^,]*)?,'+b+',/)')
h=(eval('zfile.match(/,'+b+',[^,]*,__,[^,]*,\\d+/)')==null)?eval('zfile.match(/,'+b+',[^,]*?,(\\d+)/)'):eval('zfile.match(/,'+b+',[^,]*?,__,[^,]*,(\\d+)/)')
q2="<A href="+q[1]+".htm><font size=2>≤上一篇<\/font></A> "
q='\r\n        if (event.keyCode==37) location.href="'+q[1]+'.htm";'
h2=" <A href="+h[1]+".htm><font size=2>下一篇≥<\/font></A>"
h='\r\n        if (event.keyCode==39) location.href="'+h[1]+'.htm";'
return '<script language="javascript">\r\ndocument.onkeydown=nextpage\r\n    function nextpage() {'+q+h+'\r\n        if (event.keyCode==13) location.href="index.htm";}'});
}catch(e){}
str=str.replace("<script>show(_file[i+1])<\/script>",piao);
str=str.replace("<script>showbot()<\/script>",q2+"<A href=index.htm>目录</A>"+h2);
str=str.replace(/<script[^>]*>.*?<\/script>/gi,"");
str=str.replace(/\ id=bookT/g,"");
str=str.replace(/\width="760"/g,'width="100%"');
str=str.replace(/<div class="txt">[\s\S]+?<p PBG>/i,'<div class="txt"><p PBG>');
return str.replace("<HEAD>","<HEAD>\r\n<title>"+piao+"--"+juan+"<\/title>");
}

//思源中文文章
function shif(str)
{
    str=str.replace(/\-[^-]+\-思源中文网/,'');
    str=str.replace(/<title>([^|]+)\|\1\S+\s(.+?)\|[^<]+/,'<title>$1 -- $2');
    str=str.replace(/<meta n[\s\S]+?com" \/>[\r\n]+/,'');
    str=str.replace(/<div[^>]+><script.+?<\/div>[\r\n]+/gi,'');
    str=str.replace(/[\r\n]+<hr \/>[\s\S]+?<hr \/>/gi,'');
    str=str.replace(/<div s.+?<\/div>/gi,'');
    str=str.replace("http://book.syzw.cn/configs/article/",'');
    str=str.replace(/(?:&nbsp;)+本文<a href="http[\s\S]+?<\/div>/i,'<\/div>');
    str=str.replace(/\.html/gi,'.htm');
    str=str.replace(/http:\/\/book\.syzw\.cn\/modules\/article\/lastchapter\.php\?aid=\d+dynamic=\d+/gi,'index.htm');
    return str;
}

//79文学文章
function f79(str)
{
    str=str.replace(/.+\n.+\n/,'<html>');
    str=str.replace(/\s\-\s79[^<]+/,'');
    str=str.replace(/<m[\s\S]+?T" \/>\r\n/,'');
    str=str.replace(/<meta n[\s\S]+网" \/>\r\n/,'');
    str=str.replace(/\/Skin\/Default\/Css\//gi,'');
    str=str.replace(/<table width="750[\s\S]+?<\/table>\r\n/i,'');
    str=str.replace(/<table width="100%[\s\S]+?<\/table>/gi,'');
    str=str.replace(/<\/html>[\s\S]+/i,'<\/html>');
    str=str.replace(/<script>ShowLinkMenu\('(.+?)',.+?','(.+?)'\);<\/script>/i,'$1 &nbsp;<a href="javascript:document.location=gotobook">返回目录</a>&nbsp; $2');
    str=str.replace(/\/Book\/[^"]+/i,'index.htm');
    str=str.replace(/<script.+<\/script>[\r\n]*/gi,'');
    str=str.replace(/<div [^a].+?<\/div>/gi,'');
    return str;
}

//虚拟天空文章
function xnf(str)
{
str=str.replace(/\s*-\s*虚拟天空[^<]+/,'');
str=str.replace(/htmpage\/\d+\/\d+\/content\//gi,'');
str=str.replace(/.+book.+[\r\n]+/i,'');
str=str.replace(/css\//,'');
str=str.replace(/<center[\S\s]+?\r\n<\/td><\/tr><\/table>[\r\n]*/i,'');
str=str.replace(/<!\-\-[\s\S]+?<\/td><td >/i,'<table align="center"><tr><td>');
str=str.replace(/→]<\/font><\/td><TD >[\s\S]+/i,'→]<\/font><\/td><\/tr><\/table>\r\n<\/body><\/HTML>');
str=str.replace(/book_j\.php\?tid=\d+&bid=\d+&cid=(\d+)/gi,'$1.htm');
str=str.replace(/if\s*\(event.keyCode==45\).+/i,'');
    if(obj.txt.checked)
    {
        str=str.replace(/<title>.+?<\/title>/i,"")
        str=str.replace(/<HTML>/,"<P>完!")
    }
return str;
}

//梦想文学文章
function mx9(str)
{
str=str.replace("→梦想文学网","");
str=str.replace(/<table bor[\s\S]*?<\/table>/g,'');
str=str.replace(/<script [^l][\s\S]+?<\/script>(?:\r\n)*/gi,'');
str=str.replace(/<td.*?<\/td>\r\n/,'');
str=str.replace(/ *<TR>\r\n.*?>『[\s\S]+<\/TR>\r\n/,'');
str=str.replace(/content\.html/gi,"index.htm");
str=str.replace(/(\d+)\.html/gi,"$1.htm");
str=str.replace(/\.\.\/\.\.\/include\/book2/,'css');
str=str.replace(/<div style='display:none'>.+?<\/div>/gi,'');
str=str.replace(/<table a[\s\S]+?<\/table>\r\n/,'');
    if(obj.txt.checked)
    {
        str=str.replace(/<table[\s\S]+?<\/table>/i,'');
        str=str.replace(/<!--text over-->[\s\S]+/i,'<P>完!');
    }
return str;
}

//逐浪网文章
function zhuf(str)
{
    str=str.replace(/.+\n/,'');
    str=str.replace(/\|[^|]+\|[^|]+?</,'<');
    str=str.replace("utf-8",'GB2312');
    str=str.replace(/http.+?s\//gi,'');
    str=str.replace(/<script[\s\S]+?<\/div>\r\n\r\n<div id="midbody/i,'<div id="midbody');
    str=str.replace(/<div id="oDiv"[\s\S]+/i,'<\/body><\/html>');
    str=str.replace(/http:\/\/book\.zhulang\.com\/\d+\//gi,'');
    str=str.replace(/\.html/gi,'.htm');
    str=str.replace(/<script.+?<\/script>/gi,'');
    str=str.replace("http:\/\/www.zhulang.com\/","");
    str=str.replace(/\t+<meta[\s\S]+?"">\r\n/gi,'');
    return str;
}
</script>
快书打包下载
小说下载处理器 V3[1].5.hta

相关文章

最新评论