detect adblock javascript
window.onload = function() {
setTimeout(function() {
var ad = document.querySelector("ins.adsbygoogle");
if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {
ad.style.cssText = 'display:block !important';
ad.innerHTML = "You seem to blocking Google AdSense ads in your browser.";
}
}, 2000);
};
Also in JavaScript:
- jquery multiple div click
- how to identify specific letter from a string in javascript
- javascript base64 decode
- javascript add days to date
- sum in javascript
- angular on back skip routes
- javascript closure stack overflow
- javascript return value from async function site:stackoverflow.com
- javascript remove object from array
- number to array js
- js load img
- javascript submit form when enter key pressed
- js loop over array of objects extract value
- momentjs utcoffset
- cli run js
- function expression vs function declaration
- firebase cheat sheet
- new Map() collection in react state
- how to add two attay into object in javascript
- javascript if elseif
- how to create a component in react native
- vue-sfc-rollup external dependency
- angular file upload app with django
- add new items in a select input using js