aruniverse / adblock-detect-react

Provides utilities to check if ad block is enabled on a page via either a React hook or a wrapper component.
https://www.npmjs.com/package/adblock-detect-react
MIT License
60 stars 10 forks source link

Package not detecting Brave shields ad blocker #23

Open rickstaa opened 1 year ago

rickstaa commented 1 year ago

Describe the bug

It seems that the package currently does not detect when ads are blocked using brave shields.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to https://adblock-detect-react.vercel.app/ using a brave browser.
  2. Enable brave shields.
  3. See the ad blocker not being detected.

Expected behaviour

The brave shields adblocker should be detected.

Please complete the following information:

Additional context

I tried to find a way to detect when ad blocking is enabled in brave but could not yet find a way. There seems to be a bold object on the navigator, but it doesn't contain any shield information (see https://github.com/brave/brave-browser/issues/10165#issuecomment-641128278).

ImLunaHey commented 1 year ago

It looks like it's not working for any browsers I'm using. I get the same output no matter what with and without ad blocking running.

ImLunaHey commented 1 year ago
Screen Shot 2023-02-18 at 7 14 12 pm
rickstaa commented 1 year ago
Screen Shot 2023-02-18 at 7 14 12 pm

Thanks for the report. Which blocker are you using? It seems to work for Ublockplus on chrome:

image

Wamy-Dev commented 1 year ago

Also does not detect uBlock Origin using any browser

DisabledMallis commented 8 months ago

Don't fall for this 🙏

Mohagames205 commented 8 months ago

I reported this to GitHub.

Hopefully the maintainer of this repo takes down the issue