Wykluczanie IP karczmy.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user