Twitch BUG Volume 100% Fix

45u8kj5eu8je45e4j8

作者
i9l121 ihr8f
今日安裝
0
安裝總數
3
評價
0 0 0
版本
1.1.9.25
建立日期
2025-08-07
更新日期
2025-08-13
尺寸
13.7 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!.
================================================================================================================