您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Kick.com Mouse audio controls (middle click: mute | scroll: adjust volume)
- // ==UserScript==
- // @name Kick.com Mouse audio controls
- // @namespace Sky3
- // @version 1.0
- // @description Kick.com Mouse audio controls (middle click: mute | scroll: adjust volume)
- // @author Sky3
- // @match https://kick.com/*
- // @license MIT
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- let prevScrollDate = 0;
- function addHandlers() {
- const videoElement = document.getElementById('video-player');
- videoElement.addEventListener('mousedown', (event) => {
- if (event.button == 1) {
- videoElement.muted = !videoElement.muted;
- event.preventDefault();
- event.stopPropagation();
- }
- });
- videoElement.addEventListener('wheel', (event) => {
- if (videoElement.muted) return;
- event.preventDefault();
- event.stopPropagation();
- const shouldIncrease = event.deltaY < 0;
- const volume = videoElement.volume;
- if ((volume == 0 && !shouldIncrease) || (volume == 1 && shouldIncrease)) return;
- const now = Date.now(), since = now - prevScrollDate
- const step = (shouldIncrease ? 1 : -1) * (since < 50 ? 4 : 1) * .01
- videoElement.volume += step;
- prevScrollDate = now
- });
- }
- setTimeout(() => {
- addHandlers();
- }, 2000);
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址