Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Popup modal for adblock

Hi i just want a popup modal for a javascripts , it usually detects the adblockers and tell them to disable the adblocker before entering the site , i got this code from codepen and it sayys attach your own popup modal except javascript so can i get any help who can add me a simple popup modal css for this script link to the main script - https://codepen.io/WebDEasy/pen/dxoaWB

setTimeout(function() {

var adblockEnabled = false;

 // add test element and get its styles
document.body.innerHTML += '<div class="adsbygoogle" id="ad-detector"></div>';
var adElement = document.getElementById('ad-detector');
var adElementStyle = getComputedStyle(adElement, null);


if(adElementStyle.display === 'none') { // Adblock enabled
document.getElementsByClassName('message')[0].innerHTML = 'Adblock detected!';
document.getElementsByClassName('message')[0].classList.add('ab');
} else {    // Adblock disabled
document.getElementsByClassName('message')[0].innerHTML = 'Adblock disabled! :)';
document.getElementsByClassName('message')[0].classList.add('no-ab');
}

}, 1500);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!