This commit is contained in:
2023-10-27 17:59:21 +03:00
parent cc86400957
commit b64f58c237
2 changed files with 11 additions and 1 deletions

View File

@@ -38,11 +38,18 @@ function select_tab_profile (el,url,owner_type=null) {
el.classList.add('selected')
let body = document.querySelector("body")
body.style.overflow = "hidden"
let confirm_url_f_lang = ''
if (owner_type){
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`)
confirm_url_f_lang = `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/`
} else {
window.history.pushState(null, null, `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`)
confirm_url_f_lang = `/${document.documentElement.lang}/profile/page/${profile_tabs_f_static_map.get(url)}/`
}
document.querySelector("#ru_lang").href = confirm_url_f_lang
document.querySelector("#en_lang").href = confirm_url_f_lang
middleWareJS()
},