This commit is contained in:
SBD
2023-12-05 22:17:49 +03:00
parent 885e4722af
commit d7ace77de8
2 changed files with 67 additions and 43 deletions

View File

@@ -7,8 +7,11 @@
// }
window.onload = function (){
changeTopStrMobile()
middleWareJS()
}
//
function middleWareJS(){
let footer = document.querySelector("footer")
@@ -24,13 +27,22 @@ function middleWareJS(){
body.style.overflow = ""
}
}
if (!window.location.href.includes("mobile") && !window.location.href.includes("route_search_results")){
window.location.href = window.location.href + `?mobile=${getInfoAboutUser() === 'mobile'}`
} else if (window.location.href.includes("route_search_results")){
window.location.href = window.location.href + `&mobile=${getInfoAboutUser() === 'mobile'}`
}
function changeTopStrMobile (){
let body = document.querySelector("body")
if (!window.location.href.includes("mobile")){
if (!window.location.href.includes("mobile") && !window.location.href.includes("route_search_results")){
window.location.href = window.location.href + `?mobile=${getInfoAboutUser() === 'mobile'}`
}
body.style.opacity = ''
body.style.transition = '500ms'
} else {
body.style.display = ''
body.style.transition = '500ms'
}
}
function getTypeOfData (data) {