JS
(quick guide & examples)
GOOGLE ADSENSE (HEADERS ONLY) let test = new Request( "https://pagead2.googlesyndication.com/ pagead/js/adsbygoogle.js", { method: "HEAD", mode: "no-cors" } );
TEST REQUEST fetch(test) .then(res => ALLOWED) .catch(err => BLOCKED);
"INVISIBLE" DUMMY AD <div id="ad-test" style="height: 1px; width: 1px;"></div>
CHECK IF DUMMY AD REMOVED if (document.getElementById ("ad-test").clientHeight == 0) { BLOCKED } else { ALLOWED }
SET "BLOCKED" STATUS <script>var blocked = true;</script>
RESULT <script> if (blocked) { BLOCKED } else { ALLOWED } </script>
MY-ADS.JS - BLOCKED = FALSE; <script src="my-ads.js"></script>
if (typeof blockAdBlock === "undefined") { LIBRARY CANNOT LOAD, ASSUME ADBLOCK IN PLACE } else { blockAdBlock.onDetected(() => BLOCKED); blockAdBlock.onNotDetected(() => ALLOWED); }