PageSourceSearch

https://www.bonusfinder.com/wp-content/cache/min/1/wp-content/mu-p…/subscription_email.js?ver=1790070200

js bonusfinder.com collected 2026-09-25 18:46:56 UTC 3,934 bytes, 14 lines download raw bytes

1document.querySelectorAll('.customerio-form').forEach(function(form){form.onsubmit=function(){return!1};const botCheck=document.createElement('input');botCheck.type='checkbox';botCheck.name='confirmation_box';botCheck.style.position='absolute';botCheck.style.left='-9999px';botCheck.tabIndex=-1;form.appendChild(botCheck);form.addEventListener('submit',function(event){event.preventDefault();event.stopImmediatePropagation();const emailInput=form.querySelector('#email-input');const consentCheckbox=form.querySelector('.consent-checkbox');const hiddenInput=form.querySelector('input[name="user_input"]');const debugField=form.querySelector('input[name="debug"]');const websiteRefField=form.querySelector('input[name="website_ref"]');if(hiddenInput&&hiddenInput.value!==''){console.warn('Bot detected: submission blocked.');return}
2if(botCheck.checked){console.warn('Bot detected: submission blocked.');return}
3if(!emailInput||!emailInput.value||!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(emailInput.value)){console.warn('Email address is not valid.');return}
4if(consentCheckbox&&!consentCheckbox.checked){console.warn('The user must agree to the terms and conditions.');return}
5const validDebugValues=['email-capture-content','email-capture-footer','email-capture-top','email-capture-below-oplist'];if(!debugField||!validDebugValues.includes(debugField.value)){console.warn('Bot detected: submission blocked. Invalid debug value.');return}
6if(!websiteRefField||websiteRefField.value!=='bonusfinder.com'){console.warn('Bot detected: submission blocked. Invalid website_ref value.');return}
7const formData=new FormData(form);formData.append('action','submit_subscription_form');formData.append('_ajax_nonce',ajax_object.nonce);const gUuidMatch=document.cookie.match(/(^| )g_uuid=([^;]*)(;|$)/);if(gUuidMatch){formData.append('k_tag_id',decodeURIComponent(gUuidMatch[2]))}
8fetch(ajaxurl,{method:'POST',body:formData,}).then(response=>{if(!response.ok){throw new Error('Network response was not ok.')}
9return response.json()}).then(data=>{if(data.success){const formWrapper=form.closest('.subscription-form');const imagesInSubscriptionForm=formWrapper.querySelectorAll('img');const pImgWrapper=formWrapper.querySelector('.subscription-form-elements-wrapper + p');const subscriptionFormPicture=formWrapper.querySelector('picture');formWrapper.querySelector('form').style.display='none';formWrapper.querySelector('.headline').style.display='none';formWrapper.querySelector('.description').style.display='none';formWrapper.querySelector('.submitted-headline').style.display='block';formWrapper.querySelector('.submitted-description').style.display='block';if(subscriptionFormPicture){subscriptionFormPicture.style.display='none'}
10if(pImgWrapper){pImgWrapper.style.display='none'}
11if(imagesInSubscriptionForm){imagesInSubscriptionForm.forEach(function(imageInSubscriptionForm){imageInSubscriptionForm.style.display='none'})}
12if(typeof ktag!=='undefined'&&typeof ktag.pushHashedData==='function'){ktag.pushHashedData({email:emailInput.value},'email subscription')}
13mailSubscriptionSuccessTracking()}else{console.error('Submission failed: '+data.data.message)}}).catch(error=>{console.error('Form submission failed:',error)})})});function mailSubscriptionSuccessTracking(){window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:'news_subscribe_success',category:'News Subscribe',action:'Sent',})}(function(){function injectCustomerIoForms(){var t=document.createElement('script'),s=document.getElementsByTagName('script')[0];t.async=!0;t.id='cio-forms-handler';t.setAttribute('data-site-id','83de6ff537d0b68a916a');t.setAttribute('data-base-url','https://customerioforms.com');t.src='https://customerioforms.com/assets/forms.js';s.parentNode.insertBefore(t,s)}
14if(typeof window.requestIdleCallback==='function'){window.requestIdleCallback(injectCustomerIoForms,{timeout:3000})}else{window.addEventListener('load',injectCustomerIoForms)}})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.