mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Merge pull request #4814 from Liki4/preview-features
[feature] 删除直播马赛克遮罩
This commit is contained in:
commit
4784cbf888
33
registry/lib/components/live/remove-mask-panel/index.ts
Normal file
33
registry/lib/components/live/remove-mask-panel/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { liveUrls } from '@/core/utils/urls'
|
||||
|
||||
const id = 'web-player-module-area-mask-panel'
|
||||
const entry = async () => {
|
||||
const observer = new MutationObserver(mutations => {
|
||||
mutations.forEach(mutation => {
|
||||
mutation.addedNodes.forEach(node => {
|
||||
if ((node as Element).id === id) {
|
||||
node.parentNode?.removeChild(node)
|
||||
observer.disconnect()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
observer.observe(document.body, { childList: true, subtree: true })
|
||||
}
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'removeLiveMaskPanel',
|
||||
displayName: '删除直播马赛克遮罩',
|
||||
author: {
|
||||
name: 'Liki4',
|
||||
link: 'https://github.com/Liki4',
|
||||
},
|
||||
tags: [componentsTags.live, componentsTags.style],
|
||||
description: {
|
||||
'zh-CN': '删除观看直播时某些分区的马赛克遮罩.',
|
||||
},
|
||||
entry,
|
||||
reload: entry,
|
||||
urlInclude: liveUrls,
|
||||
})
|
||||
Loading…
Reference in New Issue
Block a user