sitexw / BlockAdBlock

Allows you to detect the extension AdBlock (and other)
http://fuckadblock.sitexw.fr/blockadblock/
MIT License
614 stars 119 forks source link

Why does `check` method always return `true`? #16

Closed ghost closed 7 years ago

ghost commented 7 years ago

Calling the check method on either the default blockAdBlock instance, or on a newly instantiated instance, will always return true, whether AdBlock is paused or unpaused. Why is that?

AdBlock for Mac Chrome version 3.8.4 Chrome for Mac version Version 55.0.2883.95 Mac OS X "El Capitan" (10.11.6)

sitexw commented 7 years ago

It returns "true" when the check is executed (not if it performs positive detection). But you will return "false" to inform you that it can not execute a "check" because there is already a current detection (test 2 "check" to sharpen, the first will return "true" and the second "false").

ghost commented 7 years ago

Thank you for explaining a little more (I did not find documentation on this). I'll offer a PR to add this to the readme: https://github.com/sitexw/BlockAdBlock/pull/17