From 0864a07cdf504f586b3c2d68ba466526444d54dd Mon Sep 17 00:00:00 2001 From: borissedw Date: Fri, 27 Oct 2023 18:02:18 +0300 Subject: [PATCH] 0.0.301 --- static/js/user_profile_2.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index c64eb5b..7bc7831 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -38,16 +38,19 @@ 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 = '' + let confirm_url_f_lang_ru = '' + let confirm_url_f_lang_en = '' 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}`)}/` + confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(`${url}_${owner_type}`)}/` + confirm_url_f_lang_en = `/en/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)}/` + confirm_url_f_lang_ru = `/ru/profile/page/${profile_tabs_f_static_map.get(url)}/` + confirm_url_f_lang_en = `/en/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 + document.querySelector("#ru_lang").href = confirm_url_f_lang_ru + document.querySelector("#en_lang").href = confirm_url_f_lang_en middleWareJS()