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);
|
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 () {
|
window.initGeolocation = function () {
|
||||||
|
if (shouldBypassGeolocationHost()) {
|
||||||
|
console.warn("Bypassing geolocation for trusted host.");
|
||||||
|
startApp();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const geoScreen = document.getElementById("geoScreen");
|
const geoScreen = document.getElementById("geoScreen");
|
||||||
const loadingScreen = document.getElementById("loadingScreen");
|
const loadingScreen = document.getElementById("loadingScreen");
|
||||||
const geoMsg = document.getElementById("geoMsg");
|
const geoMsg = document.getElementById("geoMsg");
|
||||||
@@ -1102,7 +1113,9 @@ window.initGeolocation = function () {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isIOSDevice()) {
|
if (shouldBypassGeolocationHost()) {
|
||||||
|
startApp();
|
||||||
|
} else if (isIOSDevice()) {
|
||||||
showGeoConsentScreen();
|
showGeoConsentScreen();
|
||||||
} else {
|
} else {
|
||||||
initGeolocation();
|
initGeolocation();
|
||||||
|
|||||||
Reference in New Issue
Block a user