<commit_before>const getElementById = require('../../_common/common_functions').getElementById;
const MenuSelector   = require('../../_common/menu_selector');
const State          = require('../../_common/storage').State;

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(); },
    },
    BinaryOptionsForMT5: {
        onLoad: () => {
            MenuSelector.init(['what-are-binary-options', 'how-to-trade-binary', 'types-of-trades']);
            const shortcode = State.getResponse('landing_company.gaming_company.shortcode');
            if (shortcode === 'malta' || shortcode === 'maltainvest') {
                getElementById('how-to-trade-binary').setVisibility(false);
            }
        },
        onUnload: () => { MenuSelector.clean(); },
    },
};<commit_msg>menu_sections: disable how-to-trade-binary for EU client<commit_after>const getElementById = require('../../_common/common_functions').getElementById;
const MenuSelector   = require('../../_common/menu_selector');
const ClientBase     = require('../../_common/base/client_base');

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(); },
    },
    BinaryOptionsForMT5: {
        onLoad: () => {
            let menu_sections = [
                'what-are-binary-options',
                'how-to-trade-binary',
                'types-of-trades',
            ];
            const landing_company_shortcode = ClientBase.get('landing_company_shortcode');
            if (landing_company_shortcode === 'malta' || landing_company_shortcode === 'maltainvest') {
                getElementById('how-to-trade-binary').setVisibility(false);
                menu_sections = menu_sections.filter(menu_item => menu_item !== 'how-to-trade-binary');
            }
            MenuSelector.init(menu_sections);
        },
        onUnload: () => { MenuSelector.clean(); },
    },
};
{'fraction_non_alphanumeric': 0.19753086419753085, 'fraction_numerical': 0.00051440329218107, 'mean_word_length': 2.7720659553831233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '241172', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1161, 'n_words': 146}