Skip to content

Instantly share code, notes, and snippets.

@starkayc
Last active May 18, 2025 01:22
Show Gist options
  • Select an option

  • Save starkayc/9e9a03125f7eee773929e9f179e72d3b to your computer and use it in GitHub Desktop.

Select an option

Save starkayc/9e9a03125f7eee773929e9f179e72d3b to your computer and use it in GitHub Desktop.
Mute Kick Playback with middle click
// ==UserScript==
// @name Mute/Unmute Kick.com Video with Middle Mouse Button
// @namespace StarKayC
// @version 1.2
// @description Only mute/unmute Kick video when middle-clicking directly on the video player
// @author StarKayC
// @match https://kick.com/*
// @match https://www.kick.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Listen for mouse down events
document.addEventListener('mousedown', function(event) {
// Only trigger if middle mouse button is clicked
if (event.button === 1) {
const video = document.getElementById('video-player');
// Check if the target of the click is the video element
if (event.target === video) {
event.preventDefault(); // Prevent scroll
video.muted = !video.muted;
}
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment