Scrollrad steuert Lautstärke in 4er-Schritten
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5c7ab8fb8f
commit
cb3b27f0c6
1 changed files with 10 additions and 0 deletions
|
|
@ -205,6 +205,16 @@ if (volNumEl) {
|
|||
volNumEl.addEventListener('click', function () { this.select(); });
|
||||
}
|
||||
|
||||
const volSliderEl2 = document.getElementById('volume');
|
||||
const volWheelTarget = volSliderEl2 || volNumEl;
|
||||
if (volWheelTarget) {
|
||||
volWheelTarget.addEventListener('wheel', function (e) {
|
||||
e.preventDefault();
|
||||
const current = parseInt(document.getElementById('volume').value, 10);
|
||||
setVolume(current + (e.deltaY < 0 ? 4 : -4));
|
||||
}, { passive: false });
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// SSE metadata
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue