$(document).ready(function() { doAJAX('daily-challenges', 'GET').promise.then((res) => { if(res.success) { const uploadReceiptChallenge = res.data.list.find(ch => ch.id === 15); if(uploadReceiptChallenge) { skaleChallenges.showChallengeItem(uploadReceiptChallenge); } else { console.error('Upload receipt challenge not found in the list.'); } } else { console.error('Failed to fetch the list of challenges.'); } }).catch((err) => { console.error('An error occurred while fetching the list of challenges:', err); }); // COPY MANAGER $('label[for="signup-name-input"]').text('Name'); $('label[for="signup-mobile-input"]').text('Mobile Number'); $('label[for="signup-email-input"]').text('Email'); $('label[for="signup-dob-input"]').text('Date of Birth'); $('#btn-signup').text('Get Started'); // LINK // Create a new link element let newLink = $('', { class: 'bold underline', href: 'https://rayabonanza.pacificwestcampaigns.com/login', text: 'Login Here', // target: '_blank' // Opens in a new tab }); $('p.text-center.mt-5').text('Already have an account? ').append(newLink); let contactLink = $('', { class: 'bold underline', href: 'mailto:hello@skale.today', text: 'hello@skale.today', target: '_blank' // Opens in a new tab }); $('div.flex-shrink-0.small.ml-3').text(' Contact Us: ').append(contactLink); $('div.main-game-component-cta.my-4 button.btn.btn-primary').text('Spin'); $('#popup_upload_receipt-upload-btn-text').text('Upload Receipt'); // UPLOAD TEXT MODAL $('#cropper-editor h5').text('Crop Your Image to its Edges'); // PREVIEW TEXT $('#cropper-preview h5').text('Click Confirm to Submit Image'); $('.status_item h5').text('Click Confirm to Submit Image'); $('#use_voucher-modal').on('shown.bs.modal', function () { const voucher = $('#voucher_usage-slider'); $('.voucher_usage-container.dialog.status-claimed').text('Copy and paste this promo code in the Grab App through Grab Gifts').append(voucher); }); }); $(window).on('load',function(){ function initCountryCodes(dropdown_el, default_country) { $(dropdown_el).val('65').trigger('change'); } $(async function () { initCountryCodes('#signup-countrycode', 'SG'); initCountryCodes('#login-countrycode', 'SG'); autoPopulateForm(); }); })