$(document).ready(function() { // doAJAX('daily-challenges', 'GET').promise.then((res) => { // if(res.success) { // const uploadReceiptChallenge = res.data.list.find(ch => ch.id === 6); // 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); // }); $('.main-game-wrapper span[name="reward_point"]').closest('.text-bold').hide(); $('.main-game-wrapper span[name="chance_balance"]').closest('.text-bold').hide(); // sizeGuidePopup used as welcome popup in registration page, not for size guide anymore const sizeGuidePopup = `
`; $('body').append(sizeGuidePopup); if (window.location.pathname === '/register') { $('#size-guide-popup').modal('show'); } window.hide_popup = function () { $('#size-guide-popup').modal('hide'); return false; }; // trigger upload receipt challenge popup after user clicks on receipt_rejected popup button $('#trigger-upload-challenge').on('click', function () { doAJAX('daily-challenges', 'GET').promise.then((res) => { if (res.success) { const uploadReceiptChallenge = res.data.list.find(ch => ch.id === 6); 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); }); }); // // add break line for upload receipt challenge description and put small changes to the description // // hook into modal show event, which happens before the modal being display // $(document).on('show.bs.modal', '#popup_upload_receipt', function() { // modifyDescriptionText(); // }); // function modifyDescriptionText() { // // set a flag to avoid multiple modifications // if ($('.challenge_item_description').data('modified')) { // return; // } // // find the exact text pattern we want to modify // const $description = $('.challenge_item_description'); // let content = $description.html() || ''; // // only modify if we have content with "Stack" in it // if (content && content.includes('Stack')) { // content = content.replace(/(\s)Stack/, '$1Please check online platforms for different mechanics.
* Terms & Conditions apply, while stocks last.
`); }); function addHero(){ if (!$body.find('.milo-hero').length) { var $hero = $( '
'+
'