From 55bb7c37ba194db49bbf43327959d5f43e247fa7 Mon Sep 17 00:00:00 2001 From: threememories Date: Thu, 7 May 2026 20:45:14 +0000 Subject: [PATCH] Upload files to "/" --- index.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.html b/index.html index 5fb8775..c3c5fc8 100644 --- a/index.html +++ b/index.html @@ -5495,10 +5495,18 @@ Gamestate.renderInventory = function () { Gamestate.start = async function () { + // --- NEW: REQUEST FULL SCREEN ON START (MOBILE ONLY) --- + if (window.innerWidth <= 950) { + let elem = document.documentElement; + if (elem.requestFullscreen) { elem.requestFullscreen().catch(e => console.log(e)); } + else if (elem.webkitRequestFullscreen) { elem.webkitRequestFullscreen().catch(e => console.log(e)); } + } + // --- APPLY VISUAL THEME AT GAME START --- Gamestate.applyUITheme(); + // --- NEW: SET INITIAL RADIO TRACK BASED ON THEME --- const themeDropdown = document.getElementById('chosen-theme'); const selectedTheme = themeDropdown ? themeDropdown.value : "fo3"; @@ -12804,7 +12812,15 @@ Gamestate.triggerEncounterCheck = async function (triggerType, territoryName = n // --- FIX: Tell the function to accept the 'jsonString' we pass from the file button --- Gamestate.loadGame = async function (jsonString) { try { + // --- NEW: REQUEST FULL SCREEN ON LOAD (MOBILE ONLY) --- + if (window.innerWidth <= 950) { + let elem = document.documentElement; + if (elem.requestFullscreen) { elem.requestFullscreen().catch(e => console.log(e)); } + else if (elem.webkitRequestFullscreen) { elem.webkitRequestFullscreen().catch(e => console.log(e)); } + } + // 1. Check if we actually received file data + if (!jsonString) { if (this.showToast) this.showToast("Error: No save data found in file.", "red"); return false;