Forum Moderators: martinibuster
function ezsimple(callback) {
const scriptUrl = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
fetch(scriptUrl, { method: "HEAD", mode: "no-cors", cache: "no-store" })
.then(response => {
// Check if the response was redirected
if (response.redirected) {
callback(true); // Ad block likely active if redirected
} else {
callback(false); // Ad script loaded successfully
}
})
.catch(() => {
callback(true); // Ad block likely active if script fails to load
});
}