Skip to content

Commit 9b4bd54

Browse files
author
koitori77
committed
feat: ✨ 添加 kisslove (klz9.com) 站点支持
1 parent cd05165 commit 9b4bd54

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

src/index.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,36 @@ try {
483483
break;
484484
}
485485

486+
// #生肉站点[kisslove(klz9)](https://klz9.com)
487+
// test: https://klz9.com/mayonaka-heart-tune-chapter-109.html
488+
case 'klz9.com': {
489+
if (!/-chapter-/.test(location.pathname)) break;
490+
491+
const getNavBtn = (index: 0 | 1) =>
492+
querySelectorAll<HTMLButtonElement>('main button.flex-1')[index];
493+
494+
const handlePrevNext = (index: 0 | 1) => {
495+
const btn = getNavBtn(index);
496+
return btn && !btn.disabled ? () => btn.click() : undefined;
497+
};
498+
499+
options = {
500+
name: 'klz9',
501+
wait: () => querySelector('main img:not(a img)'),
502+
getImgList: () =>
503+
querySelectorAll<HTMLImageElement>('main img:not(a img)').map(
504+
(img) => img.src,
505+
),
506+
SPA: {
507+
isMangaPage: () => /-chapter-/.test(location.pathname),
508+
getOnPrev: () => handlePrevNext(0),
509+
getOnNext: () => handlePrevNext(1),
510+
handleUrl: (location) => location.pathname,
511+
},
512+
};
513+
break;
514+
}
515+
486516
// #国内漫画站[無限動漫](https://www.8comic.com)
487517
// test: 直接访问漫画页会因为 referer 检测不过而被拦截,跳过
488518
case '8.twobili.com':

0 commit comments

Comments
 (0)