-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"metadata": { | ||
"name": "Sfacg 💰", | ||
"author": "Moleys", | ||
"version": 1, | ||
"source": "https://book.sfacg.com", | ||
"regexp": "(book.|m.)?sfacg.com/(Novel|b)/\\d+/?$", | ||
"description": "Đọc truyện trên trang https://book.sfacg.com", | ||
"locale": "zh_CN", | ||
"language": "javascript", | ||
"type": "chinese_novel" | ||
}, | ||
"script": { | ||
"home": "home.js", | ||
"detail": "detail.js", | ||
"toc": "toc.js", | ||
"chap": "chap.js" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function execute(url) { | ||
let response = fetch(url); | ||
if (response.ok) { | ||
let doc = response.html(); | ||
let htm = doc.select("#ChapterBody").html(); | ||
if(url.includes("/vip/")) | ||
htm = "Extension hiện không hỗ trợ đọc chương VIP" | ||
return Response.success(htm); | ||
} | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function execute(url) { | ||
url = url.replace('m.sfacg.com/b/', 'book.sfacg.com/Novel/'); | ||
let response = fetch(url); | ||
if (response.ok) { | ||
|
||
let doc = response.html(); | ||
let coverImg = doc.select(".figure .pic img").first().attr("src"); | ||
if (coverImg.startsWith("/")) { | ||
coverImg = "https://book.sfacg.com" + coverImg; | ||
} | ||
let author = doc.select(".author-name").first().text(); | ||
return Response.success({ | ||
name: doc.select(".content .book-title").text(), | ||
cover: coverImg, | ||
author: author, | ||
description: doc.select(".introduce").text(), | ||
detail: "作者: " + author + "<br>" + doc.select(".count-detail .text-row").first().html(), | ||
host: "https://book.sfacg.com" | ||
}); | ||
} | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function execute(url, page) { | ||
if(!page) page='1' | ||
let response = fetch(url+"&PageIndex=" + page); | ||
if (response.ok) { | ||
let doc = response.html(); | ||
const data = []; | ||
doc.select(".list_tabs ul.Comic_Pic_List").forEach(e => { | ||
data.push({ | ||
name: e.select("img").first().attr("alt"), | ||
link: e.select("a").first().attr("href"), | ||
cover: e.select("img").first().attr("src"), | ||
description: e.select("a").get(2).text(), | ||
host: "https://book.sfacg.com" | ||
}) | ||
}); | ||
let next = doc.select("li.pagebarNext a").attr("href").split(/[= ]+/).pop(); | ||
// let next = (parseInt(page) + 1).toString(); | ||
return Response.success(data, next) | ||
} | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function execute() { | ||
return Response.success([ | ||
{title: "魔幻", input: "https://book.sfacg.com/List/default.aspx?tid=21", script: "gen.js"}, | ||
{title: "玄幻", input: "https://book.sfacg.com/List/default.aspx?tid=22", script: "gen.js"}, | ||
{title: "古风", input: "https://book.sfacg.com/List/default.aspx?tid=23", script: "gen.js"}, | ||
{title: "科幻", input: "https://book.sfacg.com/List/default.aspx?tid=24", script: "gen.js"}, | ||
{title: "校园", input: "https://book.sfacg.com/List/default.aspx?tid=25", script: "gen.js"}, | ||
{title: "都市", input: "https://book.sfacg.com/List/default.aspx?tid=26", script: "gen.js"}, | ||
{title: "游戏", input: "https://book.sfacg.com/List/default.aspx?tid=27", script: "gen.js"}, | ||
{title: "同人", input: "https://book.sfacg.com/List/default.aspx?tid=28", script: "gen.js"}, | ||
{title: "悬疑", input: "https://book.sfacg.com/List/default.aspx?tid=29", script: "gen.js"} | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function execute(url) { | ||
url = url.replace('m.sfacg.com/b/', 'book.sfacg.com/Novel/'); | ||
if(url.endsWith('/')) | ||
url = url.slice(0, -1) | ||
let response = fetch(url+"/MainIndex/"); | ||
if (response.ok) { | ||
let doc = response.html(); | ||
let el = doc.select(".catalog-list ul li a") | ||
const data = []; | ||
for (let i = 0;i < el.size(); i++) { | ||
var e = el.get(i); | ||
data.push({ | ||
name: e.select("a").text().replace("","").trim(), | ||
url: "https://book.sfacg.com" + e.attr("href"), | ||
host: "https://book.sfacg.com" | ||
}) | ||
} | ||
return Response.success(data); | ||
} | ||
return null; | ||
} |