Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

amam/fix_webtrader_link #1546

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cashier/deposit.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
Expand Down
2 changes: 1 addition & 1 deletion src/common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions src/navigation/navigation.es6
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const initLoginButton = (root) => {
const lockedIds = _.filter(loginIds, { s_disabled:true }).map(acc => acc.id).join(',');
$.growl.error({
fixed: true,
message:`<a href='${getBinaryUrl('contact.html')}' target='_blank'>
message:`<a href='${getBinaryUrl('contact')}' target='_blank'>
${'Your account (%) is locked, please contact customer support for more info.'.i18n().replace('%', lockedIds)}
</a>`
});
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/oauth/login.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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');
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/selfexclusion/selfexclusion.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion src/tc/tc.es6
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down