added script
This commit is contained in:
15
scripts/twitch-click-mute/main.ts
Normal file
15
scripts/twitch-click-mute/main.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
addEventListener('load', () => {
|
||||
document.body.addEventListener('click', e => {
|
||||
let target = e.target as HTMLElement | null
|
||||
if (
|
||||
target &&
|
||||
target.getAttribute('data-a-target') ===
|
||||
'player-overlay-click-handler'
|
||||
) {
|
||||
let video = document.querySelector('video')
|
||||
if (video) {
|
||||
video.muted = !video.muted
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user