Skip to content

Commit

Permalink
fix: 🐛 修复拷贝漫画高清画质替换失效的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hymbz committed Nov 7, 2024
1 parent b8f2dfa commit 2a07e22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/site/copymanga.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ declare let options: InitOptions; // eslint-disable-line @typescript-eslint/no-u
const imgList: string[] = [];
const { words, contents } = res.response.results.chapter;
for (let i = 0; i < contents.length; i++)
imgList[words[i]] = contents[i].url.replace('.c800x.', '.c1500x.');
imgList[words[i]] = contents[i].url.replace(/(?<=.*\/)c800x/, 'c1500x');
return imgList;
};

Expand Down
5 changes: 2 additions & 3 deletions src/userscript/main/useInit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,8 @@ export const useInit = async <T extends Record<string, any>>(
if (needAutoShow.val && options.autoShow) setTimeout(showComic);

(async () => {
await GM.registerMenuCommand(
t('other.enter_comic_read_mode'),
fabProps.onClick!,
await GM.registerMenuCommand(t('other.enter_comic_read_mode'), () =>
fabProps.onClick?.(),
);
await updateHideFabMenu();
})();
Expand Down

0 comments on commit 2a07e22

Please sign in to comment.