Skip to content

Commit

Permalink
update: item details
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Jun 23, 2024
1 parent 8424ee1 commit ca8b06e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
10 changes: 8 additions & 2 deletions src/rules/bangumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ if (isPageBangumi()) {
}
`,
enableFunc: async () => {
// 在Chrome上可以神奇的禁用滚轮调节音量,Firefox不生效
// 禁用滚动调音量
document.removeEventListener('wheel', disableAdjustVolume)
document.addEventListener('wheel', disableAdjustVolume)

// 监听网页全屏按钮出现
waitForEle(document.body, '.bpx-player-ctrl-web', (node: HTMLElement): boolean => {
return node.className.includes('bpx-player-ctrl-web')
Expand Down Expand Up @@ -148,7 +150,11 @@ if (isPageBangumi()) {
}
`,
enableFunc: async () => {
// 在Chrome上可以神奇的禁用滚轮调节音量,Firefox不生效
if (!navigator.userAgent.toLocaleLowerCase().includes('chrome')) {
return
}

// 禁用滚动调音量
document.removeEventListener('wheel', disableAdjustVolume)
document.addEventListener('wheel', disableAdjustVolume)

Expand Down
2 changes: 1 addition & 1 deletion src/rules/dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if (isPageDynamic()) {
// 修复字体
new CheckboxItem({
itemID: 'font-patch',
description: '修复字体 (实验功能)',
description: '修复字体',
itemCSS: fontPatchCSS,
}),
]
Expand Down
2 changes: 1 addition & 1 deletion src/rules/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ if (isPageLiveRoom()) {
// 修复字体
new CheckboxItem({
itemID: 'font-patch',
description: '修复字体 (实验功能)',
description: '修复字体',
itemCSS: `
${fontFaceRegular}
body,
Expand Down
2 changes: 1 addition & 1 deletion src/rules/popular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ if (isPagePopular()) {
// 修复字体
new CheckboxItem({
itemID: 'font-patch',
description: '修复字体 (实验功能)',
description: '修复字体',
itemCSS: `
${fontFaceRegular}
${fontFaceMedium}
Expand Down
2 changes: 1 addition & 1 deletion src/rules/space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (isPageSpace()) {
// 修复字体
new CheckboxItem({
itemID: 'font-patch',
description: '修复字体 (实验功能)',
description: '修复字体',
itemCSS: `
${fontFaceRegular}
body,
Expand Down
7 changes: 5 additions & 2 deletions src/rules/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ if (isPageVideo() || isPagePlaylist()) {
}
`,
enableFunc: async () => {
// 在Chrome上可以神奇的禁用滚轮调节音量,Firefox不生效
// 禁用滚动调音量, firefox不生效
document.removeEventListener('wheel', disableAdjustVolume)
document.addEventListener('wheel', disableAdjustVolume)

Expand Down Expand Up @@ -348,7 +348,10 @@ if (isPageVideo() || isPagePlaylist()) {
}
`,
enableFunc: async () => {
// 在Chrome上可以神奇的禁用滚轮调节音量,Firefox不生效
if (!navigator.userAgent.toLocaleLowerCase().includes('chrome')) {
return
}
// 禁用滚动调音量
document.removeEventListener('wheel', disableAdjustVolume)
document.addEventListener('wheel', disableAdjustVolume)

Expand Down
2 changes: 1 addition & 1 deletion src/rules/watchlater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if (isPageWatchlater()) {
// 修复字体
new CheckboxItem({
itemID: 'font-patch',
description: '修复字体 (实验功能)',
description: '修复字体',
itemCSS: `
${fontFaceRegular}
${fontFaceMedium}
Expand Down

0 comments on commit ca8b06e

Please sign in to comment.