• lambalicious@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    27 days ago

    There’s a huge popup on this page that says adblock not detected and that I should install one to be safe.

    Which is ironic because I’m obviously running Firefox with uBO, and they probably blocked your attempt at detect an adblocker. But if what you want to do is detect that the user is not running an adblocker, you should be testing for the positive, not the negative: your popup should only load if the code was able to do the most obnoxious, advertising-like tasks without obstruction.

    • Stefan Bohacek@stefanbohacek.onlineOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      27 days ago

      @lambalicious Right, yes, that is how, in part, this works. If you look at the source code, the “ad” uses a bunch of classes that a typical ad-blocker would pick up on.

      Also, the “popup” shouldn’t take up much of the screen, just a bit of the space at the bottom. I will have to look into all this, thank you for reporting the issues!