From a91aa595f10221dfccfe149628689115dbceec04 Mon Sep 17 00:00:00 2001 From: mustofa-binary Date: Tue, 18 May 2021 18:42:41 +0800 Subject: [PATCH 1/2] fix: webtrader link --- src/common/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/util.js b/src/common/util.js index f7a523f95..9ab830cd4 100755 --- a/src/common/util.js +++ b/src/common/util.js @@ -508,7 +508,7 @@ function getBinaryUrl(page) { var hostname = new URL(window.location.href).hostname; var lang = (local_storage.get('i18n') || {value: 'en'}).value; var domain = hostname.includes('binary.me') ? '.me' : '.com'; - var binary_url = 'https://binary' + domain + '/' + lang + '/' + page; + var binary_url = 'https://binary' + domain + '/' + lang + '/' + page + '.html'; return binary_url; } From 9a6b6f3f6a86454f72823a9e183c2e3d02a1a026 Mon Sep 17 00:00:00 2001 From: mustofa-binary Date: Tue, 18 May 2021 20:58:37 +0800 Subject: [PATCH 2/2] fix: all other links + homepage changes --- src/cashier/deposit.es6 | 2 +- src/index.js | 4 ++-- src/navigation/navigation.es6 | 6 +++--- src/oauth/login.es6 | 2 +- src/selfexclusion/selfexclusion.es6 | 2 +- src/tc/tc.es6 | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cashier/deposit.es6 b/src/cashier/deposit.es6 index 771b25492..dfdf7935e 100644 --- a/src/cashier/deposit.es6 +++ b/src/cashier/deposit.es6 @@ -101,7 +101,7 @@ function init_state(root) { list: [], current: {}, }, - binary_url: getBinaryUrl('payment-agent.html'), + binary_url: getBinaryUrl('payment-agent'), }; state.route.update = route => { state.route.value = route; }; diff --git a/src/index.js b/src/index.js index b96ff18ee..c03742e3d 100644 --- a/src/index.js +++ b/src/index.js @@ -11,8 +11,8 @@ var params_str = href.indexOf('#') != -1 ? href.split('#')[1] : href.split('?')[ var lang = (params_str && params_str.match(/lang=[a-zA-Z]+/g) || []).map(function (val) { return val.split('=')[1] })[0] || (local_storage.get('i18n') && local_storage.get('i18n').value) || 'en'; -contact_us_el.href = getBinaryUrl('contact.html'); -logo_el.href = getBinaryUrl('home.html'); +contact_us_el.href = getBinaryUrl('contact'); +logo_el.href = getBinaryUrl('home'); checkRedirectToken(params_str); diff --git a/src/navigation/navigation.es6 b/src/navigation/navigation.es6 index 0329bba4a..8a59193b3 100644 --- a/src/navigation/navigation.es6 +++ b/src/navigation/navigation.es6 @@ -170,7 +170,7 @@ const initLoginButton = (root) => { const lockedIds = _.filter(loginIds, { s_disabled:true }).map(acc => acc.id).join(','); $.growl.error({ fixed: true, - message:` + message:` ${'Your account (%) is locked, please contact customer support for more info.'.i18n().replace('%', lockedIds)} ` }); @@ -237,8 +237,8 @@ const initLang = (root) => { const contact_us_el = document.getElementById('contact-us'); const logo_container = document.getElementById('logo-container'); - contact_us_el.href = getBinaryUrl('contact.html'); - logo_container.href = getBinaryUrl('home.html'); + contact_us_el.href = getBinaryUrl('contact'); + logo_container.href = getBinaryUrl('home'); rv.bind(root[0], state); diff --git a/src/oauth/login.es6 b/src/oauth/login.es6 index 61a4b2da2..074f12d47 100644 --- a/src/oauth/login.es6 +++ b/src/oauth/login.es6 @@ -68,7 +68,7 @@ const init_state = (root, win) => { login(); }, onRegister: () => { - const register_link = getBinaryUrl('home.html'); + const register_link = getBinaryUrl('home'); window.open(register_link, '_blank'); }, }; diff --git a/src/selfexclusion/selfexclusion.es6 b/src/selfexclusion/selfexclusion.es6 index 35c0f2b3c..44fcd7567 100644 --- a/src/selfexclusion/selfexclusion.es6 +++ b/src/selfexclusion/selfexclusion.es6 @@ -90,7 +90,7 @@ const settingsData = { is_gamstop_client: null, timeout_until_date: null, timeout_until_time: null, - binary_url_contact: getBinaryUrl('contact.html'), + binary_url_contact: getBinaryUrl('contact'), trimString: (event, scope) => { const $el = $(event.target), decimals = currencyFractionalDigits(), diff --git a/src/tc/tc.es6 b/src/tc/tc.es6 index 053ac60a8..f92e36d27 100644 --- a/src/tc/tc.es6 +++ b/src/tc/tc.es6 @@ -52,7 +52,7 @@ export const init = () => { //This helps in showing multiple dialog windows in modal form $('body').append(win.dialog('widget')); win.dialog('open'); - const binary_url_tc = getBinaryUrl('terms-and-conditions.html'); + const binary_url_tc = getBinaryUrl('terms-and-conditions'); Array.from(document.getElementsByClassName('tc-link')).forEach((a_el) => a_el.href = binary_url_tc); } }