• bnn1@thelemmy.club
    link
    fedilink
    English
    arrow-up
    13
    ·
    vor 30 Tagen

    yep for websites that’s literally just checking if their ad element exists in the DOM tree.

    const myAdElementSelector = "#fuckingAd";
    const myAdElement = document.querySelector(myAdElementSelector);
    if (!myAdElement) return "yes user is using adblocker";
    

    simple as.

    or maybe not honestly i don’t know i just wanted everyone to know i know javascript.

    • Tja@programming.dev
      link
      fedilink
      English
      arrow-up
      8
      ·
      vor 30 Tagen

      2/10, should have used jQuery

      or maybe not honestly I don’t know I just wanted everyone to know I’m old enough to remember classic stackoverflow

    • merc@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      vor 29 Tagen

      You’re running software on my computer to check the state of the web page. That’s spying.

      • neatchee@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        vor 28 Tagen

        literally every website checks it’s own state multiple times, by the very nature of how modern websites work and their functionality.

        literally the only difference here is that they are telling you about the results.

        reflow for missing assets is a simple example of why a site might check the DOM state.

        Your position is nonsensical