removed twitch click mute

This commit is contained in:
2022-08-24 11:44:32 -05:00
parent 884e0aa2a1
commit 60b674e816
7 changed files with 309 additions and 180 deletions

View File

@@ -1,25 +0,0 @@
// ==UserScript==
// @name Twitch.tv Click to Mute
// @namespace zomo.dev
// @match https://www.twitch.tv/*
// @version 1.0
// @description click to mute/unmute a stream. does not work if the stream has an overlay
// @downloadURL https://git.zomo.dev/zomo/browser-scripts/raw/branch/main/dist/twitch-click-mute.user.js
// @supportURL https://git.zomo.dev/zomo/browser-scripts/issues
// @homepageURL https://git.zomo.dev/zomo/browser-scripts
// ==/UserScript==
addEventListener('load', () => {
document.body.addEventListener('click', e => {
let target = e.target
if (
target &&
target.getAttribute('data-a-target') ===
'player-overlay-click-handler'
) {
let video = document.querySelector('video')
if (video) {
video.muted = !video.muted
}
}
})
})