This repository was archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Expand file tree
/
Copy pathget_started.js
More file actions
41 lines (40 loc) · 1.83 KB
/
get_started.js
File metadata and controls
41 lines (40 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const MenuSelector = require('../../_common/menu_selector');
const TabSelector = require('../../_common/tab_selector');
const isEuCountry = require('../../app/common/country_base').isEuCountry;
const BinarySocket = require('../../app/base/socket');
module.exports = {
BinaryOptions: {
onLoad : () => { MenuSelector.init(['what-are-binary-options', 'how-to-trade-binary', 'types-of-trades', 'range-of-markets', 'glossary']); },
onUnload: () => { MenuSelector.clean(); },
},
CFDs: {
onLoad : () => { MenuSelector.init(['what-cfds-trading', 'how-trade-cfds', 'margin-policy', 'contract-specification']); },
onUnload: () => { MenuSelector.clean(); },
},
Cryptocurrencies: {
onLoad : () => { MenuSelector.init(['what-crypto-trading', 'how-trade-crypto', 'margin-policy', 'contract-specification']); },
onUnload: () => { MenuSelector.clean(); },
},
Metals: {
onLoad : () => { MenuSelector.init(['what-metals-trading', 'how-trade-metals', 'margin-policy', 'contract-specification']); },
onUnload: () => { MenuSelector.clean(); },
},
Forex: {
onLoad : () => { MenuSelector.init(['what-forex-trading', 'how-to-trade-forex', 'margin-policy', 'contract-specification']); },
onUnload: () => { MenuSelector.clean(); },
},
Index: {
onLoad: () => {
BinarySocket.wait('website_status', 'landing_company').then(() => {
if (isEuCountry()) {
const redirect_url = `${location.protocol}//${location.host}${location.pathname}?get_started_tabs=mt5`;
window.history.pushState({ path: redirect_url },'',redirect_url);
}
TabSelector.onLoad();
});
},
onUnload: () => {
TabSelector.onUnload();
},
},
};