// Immediate redirect if (window.location.href.includes('/register')) { window.location.href = window.location.href.replace('/register', '/login'); } $(document).ready(function () { $('#reward-tab').parent().hide(); $('#wallet-tab').click(); }) function initCountryCodes(dropdown_el, default_country) { const my = { call_code: '60', name: 'Malaysia' }; setTimeout(function() { if ($(dropdown_el).hasClass('select2-hidden-accessible')) { $(dropdown_el).select2('destroy'); } $(dropdown_el).find('option').remove(); var myOption = new Option('+' + my.call_code, my.call_code, true, true); $(dropdown_el).append(myOption); if ($(dropdown_el).hasClass('select2-hidden-accessible')) { $(dropdown_el).select2(); } $(dropdown_el).trigger('change'); }, 100); } $(async function () { initCountryCodes('#signup-countrycode', 'MY'); initCountryCodes('#login-countrycode', 'MY'); });