jQuery(document).ready(function ($) { const $modal = $('#giveawayModal'); $('.openGiveawayModal').on('click', function () { $modal.addClass('show'); }); $('.giveaway-close').on('click', function () { $modal.removeClass('show'); }); $(window).on('click', function (e) { if ($(e.target).is($modal)) { $modal.removeClass('show'); } }); //Google auth button js /*$('#g_id_main').on('click', function (e) { e.preventDefault(); const clientId = '426127709752-5u4i43hjp3uaq101ierl1ctmeaulk31h.apps.googleusercontent.com'; const redirectUri = 'https://instantfunding.com'; // Change this const scope = 'email profile openid'; const state = 'secureRandomState'; const nonce = 'secureRandomNonce'; const url = 'https://accounts.google.com/o/oauth2/v2/auth?' + 'client_id=' + encodeURIComponent(clientId) + '&redirect_uri=' + encodeURIComponent(redirectUri) + '&response_type=code' + '&scope=' + encodeURIComponent(scope) + '&state=' + encodeURIComponent(state) + '&nonce=' + encodeURIComponent(nonce) + '&prompt=select_account'; window.open(url, '_blank', 'width=500,height=600'); }); // Avoid running this in popup if (window.opener && window.opener !== window) return; const isSecondChancePage = window.location.pathname.includes('/giveaway-second-chance'); $(window).on('message', function (e) { const event = e.originalEvent; if (!event.data || !event.data.giveawayAuthSuccess) return;