Twitch BUG Volume 100% Fix

restoring a preset volume level from storage, preventing 100% noise.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
i9l121 ihr8f
今日安裝
0
安裝總數
8
評價
0 0 0
版本
1.1.9.25
建立日期
2025-08-07
更新日期
2025-09-06
尺寸
13.9 KB
授權條款
MIT
腳本執行於

================================================================================================================

Twitch Volume Fix is a script created to fix a bug on Twitch, This script automatically saves and restores your preset volume of 15% or 34%, preventing an annoying bug when the volume suddenly crashes to 100% when changing the channel or loading the page.

=================================================================================================================
You can also select the default volume level so that it doesn't suddenly get very loud.
console.log('Нет сохраненного значения, устанавливаем значение по умолчанию (0.05)');
const defaultVolume = 0.05; // Изменено с 0.1 на 0.05 (5%)
a line in the 123
You can also select the default name key storage
==============================================================================
twitch__Player__master__Volume
// Кастомный ключ для chrome.storage.sync
const VOLUME_KEY = 'twitch__Player__master__Volume';
==============================================================================
and this
==============================================================================
// Очищаем старые ключи из localStorage
if (localStorage.getItem('twitch__Player__master__Volume')) {
console.log('Удаляем старый ключ twitch__Player__master__Volume из localStorage');
localStorage.removeItem('twitch__Player__master__Volume');
}
==============================================================================
=================================================================================================================

Key Features:Auto-save volume: The script saves the selected volume level in chrome.storage.sync so that your settings are saved between sessions and devices.
Fixing the 100% volume bug: Detects and corrects cases when Twitch automatically sets the maximum volume, returning your preferred level.
Universal Slider Search: Searches for the volume slider in the regular DOM, Shadow DOM, and even inside the iframe, ensuring reliable operation on any Twitch pages.
Dynamic Interface Update: Seamlessly updates the slider's visual elements (fill bar and ARIA attributes) to accurately display the current volume.
Channel Change Tracking: Responds to URL changes and Twitch API events to apply volume settings when switching broadcasts.
Error Tolerance: Includes multiple attempts to find the slider, monitoring DOM changes, and error handling for stable operation.
Optimized performance: Runs once, avoiding repeated executions, and uses a 7-second delay for reliable initialization.
================================================================================================================
================================================================================================================

Unfortunately, this only works on Yandex Firefox and Edge right now. tampermonkey does not work on chrome!.
================================================================================================================