Skip to content

Commit 19c319d

Browse files
committed
Remove video delay limits
1 parent e575f09 commit 19c319d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

chrome/player/options/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h1 style="margin-top: 0px" data-i18n="options_video_header"></h1>
5252
data-i18n-label="options_video_zoom"></input>
5353
</div>
5454

55-
<div class="video-option" data-option="videoDelay" data-unit="ms" data-multiplier="1">
55+
<div class="video-option" data-option="videoDelay" data-unit="ms" data-multiplier="1" data-nolimits="true">
5656
<div class="label" data-i18n="options_video_delay"></div>
5757
<input class="number" type="text" data-i18n-label="options_video_delay"></input>
5858
<input class="range" type="range" min="-1000" max="1000" value="0" step="1" list="snap-zero"

chrome/player/options/options.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ button:focus-visible {
343343
.video-option .number {
344344
text-align: center;
345345
font-variant-numeric: tabular-nums;
346-
width: 60px;
346+
width: 80px;
347347
}
348348

349349
#ratebox {

chrome/player/options/options.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ document.querySelectorAll('.video-option').forEach((option) => {
270270
const optionKey = option.dataset.option;
271271

272272
function numberInputChanged() {
273-
rangeInput.value = parseInt(numberInput.value.replace(unit, '')) || 0;
274-
Options[optionKey] = parseInt(rangeInput.value) / unitMultiplier;
273+
const value = parseInt(numberInput.value.replace(unit, '')) || 0;
274+
rangeInput.value = value;
275+
Options[optionKey] = (option.dataset.nolimits ? value : parseInt(rangeInput.value)) / unitMultiplier;
275276
optionChanged();
276277
}
277278

@@ -282,7 +283,6 @@ document.querySelectorAll('.video-option').forEach((option) => {
282283
}
283284

284285
numberInput.addEventListener('change', numberInputChanged);
285-
numberInput.addEventListener('input', numberInputChanged);
286286
rangeInput.addEventListener('change', rangeInputChanged);
287287
rangeInput.addEventListener('input', rangeInputChanged);
288288
rangeInput.addEventListener('dblclick', (e) => {

0 commit comments

Comments
 (0)