$(document).ready(function() { // $('.reward-debug').hide(); $('#popup_challenge_result').on('shown.bs.modal', function(){ $('.voucher-card').each(function () { var title = $(this).find('.voucher-title').text().trim(); // Check if the title matches if (title === 'France Trip for 2 Raffle Entry') { $(this).find('.btn-use-reward, .btn-redeem-reward').remove(); } }); }); // $('#popup_rewards').on('shown.bs.modal', function(){ // $('.voucher-card').each(function () { // var title = $(this).find('.voucher-title').text().trim(); // // Check if the title matches // if (title === 'France Trip for 2 Raffle Entry') { // $(this).find('.btn-use-reward, .btn-redeem-reward').remove(); // } // }); // }); /** THIS PART HERE IS TO HIDE REDEEM BUTTON FOR ONLY RAFFLE VOUCHERS **/ const css = ` .voucher-card.hide-raffle .btn-use-reward { display: none !important; } `; const style = document.createElement('style'); style.appendChild(document.createTextNode(css)); document.head.appendChild(style); function hideRaffle() { $('.voucher-card').each(function(){ const $card = $(this); const title = $card.find('.voucher-title').text().trim(); if (title === 'France Trip for 2 Raffle Entry') { $card.addClass('hide-raffle'); } }); } // override the global renderVouchers so hide immediately after render if (window.renderVouchers) { const orig = window.renderVouchers; window.renderVouchers = function(data, container){ orig(data, container); hideRaffle(); }; } $('#popup_rewards, #popup_challenge_result') .on('shown.bs.modal', hideRaffle); $(hideRaffle); /** END OF PART **/ $('.text-bold').each(function() { if ($(this).text().trim().toLowerCase().startsWith("points:")) { $(this).remove(); } }); $('.text-bold').each(function() { if ($(this).text().trim().toLowerCase().startsWith("tries left:")) { $(this).contents().first()[0].textContent = "Spins remaining:"; } }); $("a:contains('Privacy Policy')").attr("href", "https://pierrefabrecarnival2025.skale.today/privacy-policy/"); $("a:contains('Terms & Conditions')").last().attr("href", "https://pierrefabrecarnival2025.skale.today/terms-conditions/"); $(".flex-shrink-0 a[href^='mailto:']").attr("href", "mailto:support@skale.today").text("support@skale.today"); // Upload a Receipt to Unlock Spin setTimeout(function () { $(".btn.btn-primary.disabled").text('Upload a Receipt to Unlock Spin'); }, 1500); $('#install-toast').hide(); });