Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
修复起点书页BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
lifegpc committed Oct 3, 2020
1 parent e5414ff commit 483f59f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 4 additions & 5 deletions js(origin)/bookinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,20 @@ chrome.runtime.onMessage.addListener(function(message, sender,sendResponse)
}
mlt.t=temp.split('·')[0];//卷名
mlt.tc=temp.split('·')[1].split('共')[1].split('章')[0]-1+1;//总章数
mlt.tw=temp.split('·')[1].split('共')[2].split('字')[0]-1+1;//总字数
// mlt.tw=temp.split('·')[1].split('共')[2].split('字')[0]-1+1;//总字数
if(ci.children[i].children[1].children[te].className=="vip")mlt.vip=1;else mlt.vip=0;//是否为VIP卷
var t=ci.children[i].children[2];
mlt.l=getchatperlist(t,mlt.vip);//章节列表
}
else
{
var temp=ci.children[i].children[1].innerText.split('\n');
temp=temp[temp.length-1];
temp=temp.split(' ');
temp=[temp[temp.length-2],temp[temp.length-1]];
temp = temp[4].split(' ')
temp = [temp[temp.length - 2], temp[temp.length - 1]]
mlt.t=temp[0].split('·')[0];//卷名
mlt.tc=temp[0].split('共')[1].split('章')[0]-1+1;//总章数
if(temp[1].indexOf('免费')>-1)mlt.vip=0;else mlt.vip=1;//是否为VIP卷
mlt.tw=temp[1].split('共')[1].split('字')[0]-1+1;//总字数
// mlt.tw=temp[1].split('共')[1].split('字')[0]-1+1;//总字数
var t=ci.children[i].children[2];
mlt.l=getchatperlist(t,mlt.vip);//章节列表
}
Expand Down
14 changes: 14 additions & 0 deletions js(origin)/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,19 @@ function getfjinfo(ml,list)
}
return s;
}
function caltw(ml)
{
for(var i=0;i<ml.length;i++)
{
var tem = ml[i];
var tw = 0;
for(var j=0;j<tem.l.length;j++)
{
tw += tem.l[j].w;
}
tem.tw = tw;
}
}
function printbookinfo(data)
{
document.getElementById('bname').innerText=data.bn;
Expand All @@ -454,6 +467,7 @@ function printbookinfo(data)
for(var i=1;i<data.ind.length;i++)c+=("\n"+data.ind[i]);
document.getElementById('bdd').innerText=c;
document.getElementById('atag').innerText=getatagstr(data.atag);
caltw(data.ml);
document.getElementById('zjs').innerText=getzjsd(data.ml);
document.getElementById('zch').innerText=getzch(data.ml);
document.getElementById('zzs').innerText=getzss(data.ml);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version":2,
"name":"起点下载器",
"version":"1.0.4",
"version":"1.0.5",
"description":"下载起点中文网/纵横中文网上的小说。已在github上开源,项目链接:https://github.com/lifegpc/qdbookdownload",
"icons":
{
Expand Down

0 comments on commit 483f59f

Please sign in to comment.