Skip to content

Commit

Permalink
feat(copymanga): we can back to menu page
Browse files Browse the repository at this point in the history
  • Loading branch information
Arylo committed Aug 8, 2024
1 parent eaeab51 commit f665711
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/monkey/copymanga-enhance.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="app">
<div class="header">
<a :href="prevUrl" :class="{'no-action': !prevUrl}" class="btn"><span>上一话</span></a>
<span class="title">{{ title }}</span>
<a :href="menuUrl" class="title"><span>{{ title }}</span></a>
<a :href="nextUrl" :class="{'no-action': !nextUrl}" class="btn"><span>下一话</span></a>
<select v-model="mode" @change="selectMode">
<option :value="ComicDirection.LTR">正常模式</option>
Expand Down
1 change: 1 addition & 0 deletions src/monkey/copymanga-enhance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ setTimeout(() => {
const info = {
prevUrl: void 0,
nextUrl: void 0,
menuUrl: void 0,
...JSON.parse(cacheContent),
}
return renderNewPage(info)
Expand Down
2 changes: 2 additions & 0 deletions src/monkey/copymanga-enhance/old.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ export const getPageInfo = () => {
const info: PageInfo = {
images: list,
title: $('.header').get(0)?.innerText,
menuUrl: footerElements.get(3)?.href,
prevUrl: footerElements.get(1)?.className.includes('prev-null') ? undefined : footerElements.get(1)?.href,
nextUrl: footerElements.get(2)?.className.includes('prev-null') ? undefined : footerElements.get(2)?.href,
}
console.log('PageInfo:', info)
return info
}
1 change: 1 addition & 0 deletions src/monkey/copymanga-enhance/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export type PageInfo = {
title?: string,
prevUrl?: string,
nextUrl?: string,
menuUrl?: string,
}

export type VueBaseData = Record<string, any>
Expand Down

0 comments on commit f665711

Please sign in to comment.