Add Hide Arrows on Mobile option to configuration and update related logic

This commit is contained in:
CodeDevMLH
2026-03-08 20:09:47 +01:00
parent 22a7eb8dcb
commit 41e6c1032d
3 changed files with 50 additions and 28 deletions

View File

@@ -57,6 +57,7 @@ const CONFIG = {
preferredVideoQuality: "Auto",
enableKeyboardControls: true,
alwaysShowArrows: false,
hideArrowsOnMobile: true,
enableCustomMediaIds: true,
enableSeasonalContent: false,
customMediaIds: "",
@@ -3469,6 +3470,10 @@ const initArrowNavigation = () => {
container.appendChild(muteButton);
const showArrows = () => {
if (CONFIG.hideArrowsOnMobile && window.matchMedia("only screen and (max-width: 768px)").matches) {
return; // disable arrow display on mobile
}
leftArrow.style.display = "block";
rightArrow.style.display = "block";