added script

This commit is contained in:
2022-06-06 18:09:30 -05:00
parent 29b70f62e0
commit 66276486a0
5 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es2020",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
}

View 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
}
}
})
})

View File

@@ -0,0 +1,8 @@
{
"$schema": "../meta.schema.json",
"name": "twitch click to mute",
"namespace": "zomo.dev",
"match": "https://www.twitch.tv/*",
"version": "1.0",
"description": "click to mute/unmute"
}

View File

@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es2020",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
}