Skip to content

Commit 0e3083e

Browse files
committed
feat: ✨ 简易模式可以自动识别更多网站的上/下话
https://sleazyfork.org/scripts/374903/discussions/301791
1 parent 82b18d6 commit 0e3083e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/userscript/otherSite/chapterSwitch.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import type { MangaProps } from 'components/Manga';
22

33
import { querySelectorAll } from 'helper';
44

5-
const prevRe = /^(?:?(?:[]|)|prev|prev chapter|)$/i;
6-
const nextRe = /^(?:?(?:[]|)|next|next chapter|)$/i;
5+
const prevRe =
6+
/^?(?:[]|)$|^(?:prev|previous)(?:\s+chapter)?$|^$/i;
7+
const nextRe = /^?(?:[]|)$|^next(?:\s+chapter)?$|^$/i;
78

89
export const getChapterSwitch = () => {
910
let onPrev: MangaProps['onPrev'];

0 commit comments

Comments
 (0)