diff --git a/src/header.json b/src/header.json index 03184d33..ab947eb4 100644 --- a/src/header.json +++ b/src/header.json @@ -227,7 +227,8 @@ "*://www.qbtr.cc/*/*.html", "*://b.guidaye.com/*/*/", "*://www.esjzone.me/detail/*", - "*://www.esjzone.cc/detail/*" + "*://www.esjzone.cc/detail/*", + "*://www.fxshu.top/*/*.html" ], "exclude": [ "*://www.jjwxc.net/onebook.php?novelid=*&chapterid=*", @@ -293,6 +294,7 @@ ], "connect": [ "self", + "www.fxshu.top", "qidian.com", "yuewen.com", "kuangxiangit.com", @@ -365,6 +367,7 @@ "xiaoshuowanben.com", "xbyuan.com", "shaoniandream.com", + "fuxs1.com", "*" ], "require": [ diff --git a/src/router/download.ts b/src/router/download.ts index df601c47..adbfeee4 100644 --- a/src/router/download.ts +++ b/src/router/download.ts @@ -280,6 +280,11 @@ export async function getRule(): Promise { ruleClass = c256wxc; break; } + case "www.fxshu.top": { + const { fuxiaoshu } = await import("../rules/onePage/fuxiaoshu"); + ruleClass = fuxiaoshu; + break; + } case "www.xiaoshuowanben.com": { const { wanben } = await import("../rules/onePage/wanben"); ruleClass = wanben(); diff --git a/src/router/ui.ts b/src/router/ui.ts index fe8dfd7c..4a0fd0fd 100644 --- a/src/router/ui.ts +++ b/src/router/ui.ts @@ -174,6 +174,18 @@ export function getUI(): () => UIObject { } }; } + case "www.fxshu.top": { + const style = document.createElement("style"); + style.innerHTML = ` + img { + font-size: 1em; + } + `; + document.head.appendChild(style); + return () => { + return defaultObject; + } + } case "www.zongheng.com": case "book.zongheng.com": case "huayu.zongheng.com": { diff --git a/src/rules/onePage/fuxiaoshu.ts b/src/rules/onePage/fuxiaoshu.ts new file mode 100644 index 00000000..09331d46 --- /dev/null +++ b/src/rules/onePage/fuxiaoshu.ts @@ -0,0 +1,19 @@ +import { mkRuleClass } from "./template"; + +export const fuxiaoshu = mkRuleClass({ + bookUrl: document.location.href, + bookname: ( + document.querySelector(".con_box h1") as HTMLHeadElement + ).innerText.trim(), + author: ( + document.querySelector(".con_box .tits strong a") as + | HTMLAnchorElement + | HTMLSpanElement + ).innerText + .trim(), + introDom: undefined, + coverUrl: null, + aList: Array.from(document.querySelectorAll(".alt_page li > a")).slice(2), + getContent: (doc) => doc.querySelector("div.co-bay") as HTMLElement, + contentPatch: (content) => content, +});