This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,14 @@ function getBinaryUrl(page) {
517517 return binary_url ;
518518}
519519
520+ function getBinaryUrlWithoutLng ( page ) {
521+ var hostname = new URL ( window . location . href ) . hostname ;
522+ var domain = hostname . includes ( 'binary.me' ) ? '.me' : '.com' ;
523+ var binary_url = 'https://binary' + domain + '/' + page ;
524+
525+ return binary_url ;
526+ }
527+
520528function getDerivUrl ( page ) {
521529 var hostname = new URL ( window . location . href ) . hostname ;
522530 var lang = ( local_storage . get ( 'i18n' ) || { value : 'en' } ) . value ;
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ function processRedirect(selected_language_name) {
9090 }
9191 }
9292 if ( ( ! isEuCountrySelected ( ip_country ) && has_mf ) || ( isEuCountrySelected ( residence_country ) && account_list . length == 1 ) ) {
93- window . location . href = getBinaryUrl ( 'move-to-deriv' )
93+ window . location . href = getBinaryUrlWithoutLng ( 'move-to-deriv' )
9494 } else {
9595 window . location . href = VERSION + 'main.html' ;
9696 }
@@ -101,9 +101,10 @@ function processRedirect(selected_language_name) {
101101}
102102function processPageLanguage ( ) {
103103 populateLanguageDropdown ( ) ;
104+ var selected_language_name = ( window . local_storage . get ( 'i18n' ) || { value : 'en' } ) . value ;
104105
105106 if ( local_storage . get ( 'oauth' ) ) {
106- processRedirect ( ) ;
107+ processRedirect ( selected_language_name ) ;
107108 } else {
108109 document . getElementById ( 'loading_container' ) . style . display = "none"
109110 document . getElementById ( 'main_container' ) . style . display = "block"
@@ -112,7 +113,6 @@ function processPageLanguage() {
112113 setTime ( ) ;
113114 setInterval ( setTime , 1000 ) ;
114115
115- var selected_language_name = ( window . local_storage . get ( 'i18n' ) || { value : 'en' } ) . value ;
116116 $ . getJSON ( VERSION + 'i18n/' + selected_language_name + '.json' , function ( data ) {
117117 setupi18nTranslation ( data ) ;
118118 processFooter ( selected_language_name ) ;
You can’t perform that action at this time.
0 commit comments