Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0206 committed Nov 14, 2024
1 parent dac4578 commit 954b6be
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/header.json
Original file line number Diff line number Diff line change
Expand Up @@ -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=*",
Expand Down Expand Up @@ -293,6 +294,7 @@
],
"connect": [
"self",
"www.fxshu.top",
"qidian.com",
"yuewen.com",
"kuangxiangit.com",
Expand Down Expand Up @@ -365,6 +367,7 @@
"xiaoshuowanben.com",
"xbyuan.com",
"shaoniandream.com",
"fuxs1.com",
"*"
],
"require": [
Expand Down
5 changes: 5 additions & 0 deletions src/router/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ export async function getRule(): Promise<BaseRuleClass> {
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();
Expand Down
12 changes: 12 additions & 0 deletions src/router/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
19 changes: 19 additions & 0 deletions src/rules/onePage/fuxiaoshu.ts
Original file line number Diff line number Diff line change
@@ -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,
});

0 comments on commit 954b6be

Please sign in to comment.