Fix mobile alert
This commit is contained in:
parent
d06884eeb6
commit
f12d4ac7fd
@ -25,7 +25,7 @@ setTimeout(async () => fl.go(window.location.pathname + location.search), 50);
|
|||||||
|
|
||||||
let isMobile = window.screen.availWidth / window.screen.availHeight <= 1.45;
|
let isMobile = window.screen.availWidth / window.screen.availHeight <= 1.45;
|
||||||
|
|
||||||
if (isMobile) {
|
if (isMobile && !document.cookie.includes('warning_showed=true;')) {
|
||||||
// Я это уберу как только буду уверен, что на мобильной версии нет никаких проблем
|
// Я это уберу как только буду уверен, что на мобильной версии нет никаких проблем
|
||||||
fl.go('/mobile-warning?go=' + new URLSearchParams(location.pathname + location.search).toString().slice(0, -1));
|
fl.go('/mobile-warning?go=' + new URLSearchParams(location.pathname + location.search).toString().slice(0, -1));
|
||||||
}
|
}
|
||||||
@ -33,6 +33,7 @@ if (isMobile) {
|
|||||||
function goFromMobileWarning () {
|
function goFromMobileWarning () {
|
||||||
const currentURL = new URL(location.href);
|
const currentURL = new URL(location.href);
|
||||||
fl.go(currentURL.searchParams.get("go"));
|
fl.go(currentURL.searchParams.get("go"));
|
||||||
|
if (!document.cookie.includes('warning_showed=true;')) document.cookie += 'warning_showed=true;';
|
||||||
}
|
}
|
||||||
|
|
||||||
let mainMenuErrorHandled = false;
|
let mainMenuErrorHandled = false;
|
||||||
|
Reference in New Issue
Block a user