Skip to content

Commit

Permalink
适配部分网站
Browse files Browse the repository at this point in the history
  • Loading branch information
Bistutu committed Apr 26, 2024
1 parent 0d7ef66 commit 7f426a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entrypoints/compat/compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ export const selectCompatFn: SelectCompatFn = {
},
["youtube.com"]: (node: any) => {
if (node.tagName.toLowerCase() === 'yt-formatted-string') return true
},
['www.webtrees.net']: (node: any) => {
// class='kmsg'
if (node.tagName.toLowerCase() === 'div' && node.classList.contains('kmsg')) return true
}
}
2 changes: 2 additions & 0 deletions entrypoints/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default defineContentScript({
}
});

// todo 2024.4.26 双击翻译)开关控制

// background.ts
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.message === 'clearCache') {
Expand Down

0 comments on commit 7f426a8

Please sign in to comment.