Wykluczanie IP karczmy.

This commit is contained in:
2026-05-28 09:33:53 +02:00
parent f4ed9b3982
commit 720aa1448b

View File

@@ -1002,7 +1002,18 @@ function isIOSDevice() {
return /iPad|iPhone|iPod/.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
}
function shouldBypassGeolocationHost() {
const bypassHosts = ['82.160.190.247'];
return bypassHosts.includes(window.location.hostname);
}
window.initGeolocation = function () {
if (shouldBypassGeolocationHost()) {
console.warn("Bypassing geolocation for trusted host.");
startApp();
return;
}
const geoScreen = document.getElementById("geoScreen");
const loadingScreen = document.getElementById("loadingScreen");
const geoMsg = document.getElementById("geoMsg");
@@ -1102,7 +1113,9 @@ window.initGeolocation = function () {
);
};
if (isIOSDevice()) {
if (shouldBypassGeolocationHost()) {
startApp();
} else if (isIOSDevice()) {
showGeoConsentScreen();
} else {
initGeolocation();