Giter VIP home page Giter VIP logo

adblock-detect-react's Introduction

Hi there 👋

adblock-detect-react's People

Contributors

aruniverse avatar chillyistkult avatar dawsbot avatar goiblas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adblock-detect-react's Issues

can't detect adblock with tampermonkey

Describe the bug
If the user is using tamper monkey to block ad, it can't be detected by this package

To Reproduce

  1. install tamper monkey and find userscript, one sample tamper monkey code, also see this one
// ==UserScript==
// @name         test adsense
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://localhost:3000/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

window.addEventListener('load', function () {
   document.querySelectorAll('.adsbygoogle').forEach(a => a.remove())
})

})();
  1. refresh the page, ads are gone but no prompt.

Expected behavior
It should be detected.

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • OS: [macOS Ventura 13.1 (22C65)]
  • Browser [Chrome]
  • Browser Version [109.0.5414.119]
  • Package Version [latest, 1.1.0]

Additional context
possible to add some patch in useEffect code to detect

    setTimeout(() => {
      const nodes=document.querySelectorAll(".adsbygoogle");
      if(nodes.length === 0) {
        setAdBlockDetected(true);
      }
    }, 3000);

uBlock Origin

It doesn't work anymore it bypass uBlock Origin, Brave blocker and more...

detect uBlock Popup blocker

We have just had one of our clients, say to us that they use uBlock and they tried to do a payment on our website, which requires a popup to launch and them to verify the card owner details with their bank (normally done via SMS or an Auth app)

However uBlock blocked the popup, which has now caused the customer grief.

Describe the solution you'd like
We would like to be able to disable the submit button or/and display a banner saying please disable uBlock for this website.
this one (https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm)

Offer a way to re-check when browser path change

Pass config object to hook to re-check when browser urls changes.

When I make a route change with next-router system and the destination path is not in the adblock whitelist this module does not catch it

Keep only JS files, not JSX

Hello. I use a custom webpack configuration which doesn't support JSX (only JS/TS/TSX) and when I run a project I have this issue. It's clear what's wrong and a possible solution is to add a specific loader for JSX. But, is it possible to keep only js files inside this package?
image

Rejecting doubleclick.net will not affect the display of the ad, why check this address?

Hello, Rejecting doubleclick.net will not affect the display of the ad, why check this address?

Some proxy software deny access to doubleclick.net by default, but it does not affect the display of ads.

It has false positives on my site. The ad is shown, but useDetectAdBlock() returns true.

const url = "https://www3.doubleclick.net";

image

Not Working

I have AdBlock Plus installed on my browser and on my website it is not working anymore. It need's to be updated.

Initial value

Hello. I think it’d be a good idea to add a possibility of setting the hook initial value.

By default the hook initial value is false. But in some cases it might be useful to set the initial value to null just to make sure that the hook did all to define is there Adblock or not.

This feature might be implement by passing a specific argument to the hook.

Hook example: useDetectAdBlock({ initialValue: null })

In code:

…useDetectAdBlock = ({ initialValue = false }) => {
  const [adBlockDetected, setAdBlockDetected] = useState(initialValue);
)}

Package not detecting Brave shields ad blocker

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 brave/brave-browser#10165 (comment)).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.