ubyssey / ubyssey.ca

The code that powers ubyssey.ca
https://ubyssey.ca/
GNU General Public License v2.0
36 stars 41 forks source link

BlockAdBlock is not functional #1158

Open FireBoyAJ24 opened 1 year ago

FireBoyAJ24 commented 1 year ago

What behavior were you expecting?

BlockAdBlock is a JS script which was added to remove any adblockers on to the site. In addition, a pop up will be displayed to allow for cookies to be used and to remove the adblock. We would still allow the reader threw after the pop up.

What actually happened?

Two main things have happened.

  1. The website is unable to notify the reader about the adblocker and to disable it.
  2. The BlockAdBlock does not prevent the adblocker from blocking the ads. I have tested this with an adblocker and only using Brave. a. BlockAdBlock is not actively being supported as their have been a number of issues that has not been resolved for a number of years.

A possible replacement where we detect an adblocker is from StackOverflow.

In addition, to the BlockAdBlock file there is a AdblockSplash.jsx and extra js in the base.html that needs to be removed and replaced with the above solution.

FireBoyAJ24 commented 1 year ago

After some discussion in the meeting we have come to a consensus that we would not be able to win a war against the adblockers as they will continuously improve and prevent us from detecting them being active. We plan to add a note that we do not like the use of adblockers with the cookies banner or have a separate banner.

To any volunteers who wish to dip your toes in adblocking, go ahead! I have implemented an incredibly simple algorithm to detect an adblocker but if you wish to experiment with other methods then that is welcome. One of the issues I faced was that if we tested the websites heights (height = 0 -> adblock detected) we could have a false positive and make users who do not have an active adblocker get an unwarranted pop up message. The false positive could occur if one of the ads do not load up correctly. For example, mobile-leaderboard issue as of the date of this message.