From 46cd4f77c9bc04cabf8f17864b4fc030167e5f01 Mon Sep 17 00:00:00 2001 From: Joe Gitta Date: Wed, 27 May 2026 13:40:56 +0000 Subject: [PATCH] deploy: weather patch --- browser.py | 2 ++ weather.html | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/browser.py b/browser.py index 47460ae..e9a3c44 100755 --- a/browser.py +++ b/browser.py @@ -803,6 +803,8 @@ def launch_chrome(): "--disable-extensions", "--disable-gpu", "--disable-dev-shm-usage", + "--disable-web-security", + "--allow-file-access-from-files", f"--user-data-dir={profile_dir}", f"--remote-debugging-port={CDP_PORT}", "--remote-allow-origins=*", diff --git a/weather.html b/weather.html index ecc64ca..ef1068e 100644 --- a/weather.html +++ b/weather.html @@ -265,14 +265,14 @@ async function fetchViaIP() { try { document.getElementById('loading-text').textContent = "🌐 Looking up location via IP..."; - const resp = await fetch("https://ipapi.co/json/"); + const resp = await fetch("https://freeipapi.com/api/json"); const data = await resp.json(); let locName = "Your Area"; - if (data.city && data.region) { - locName = `${data.city}, ${data.region}`; - } else if (data.city) { - locName = data.city; + if (data.cityName && data.regionName) { + locName = `${data.cityName}, ${data.regionName}`; + } else if (data.cityName) { + locName = data.cityName; } if (data.latitude && data.longitude) {