Skip to content

πŸ₯” Detects ad blockers and shows a banner to encourage users to disable them.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

The-3Labs-Team/potatoshield

PotatoShield - Detect & Block Adblock on your website

Lint Playwright Build License Maintainability

Potatoshield is a revolutionary script designed to empower website owners in the battle against adblock software. With its lightweight and user-friendly nature, Potatoshield effortlessly detects adblockers and displays a captivating banner to users.

⚠️ *Note: This project is still in development. The current version is a beta version, and it may not work as expected, it may have bugs and it may change in the future. Use it at your own risk. For the best experience, please read the RTFM article here.

PotatoShield Demo Gif

Features

  • Detect adblock software on your website
  • Undetectable by adblockers (with some tweaks)
  • Lightweight script (less than 20KB in obfuscated mode)
  • Easy to use, just inline the script in your HTML layout
  • Open-source, no hidden fees or subscriptions, no data collection
  • Shows a banner to the user in multiple languages (coming soon)
  • Use with NPM (coming soon)

List of detected adblocks

Here you can find a list of adblock software that has been detected by PotatoShield, along with their versions and the date of the last check.

Adblockers

Software Version Detected Last check Official Site
uBlock 1.0 βœ… 2024-07-29 uBlock
Adblock 6.6.0 βœ… 2024-07-30 Adblock
Adblock Plus 4.4 βœ… 2024-07-30 Adblock Plus
Adblock Ultimate 3.8.26 βœ… 2024-07-30 Adblock Ultimate
AdGuard AdBlocker 4.3.64 βœ… 2024-07-30 AdGuard
Ghostery 8.12.13 βœ… 2024-07-30 Ghostery
Lock Adblock 3.5.1 βœ… 2024-07-30 Lock Adblock
SmartAdblock 1.1.4 βœ… 2024-07-30 SmartAdblock

Browsers

// TODO

Before you start

Before you start using potatoshield, you need to know that it is not a 100% bulletproof solution. Adblockers are constantly evolving, and they may find a way to detect potatoshield in the future.

The best way to fight against adblock users is to clone the project, build the script, and host it on your server (jump to #https://github.com/The-3Labs-Team/potatoshield#make-it-undetectable). This way, you can rotate the script name and make it harder for adblockers to detect it.

Installation

You have four methods to use potatoshield on your website:

1. Inline the script (recommended)

You can inline the script in your HTML layout before the closing </body> tag:

<script type="module" defer>
  // Add dist/potatoshield.min.ob.js content here
  const a0_0x191034=a0_0x4f56;(function(_0x15f1d4,_0x16b33d){const _0x3b7bb4=a0_0x4f56...
</script>

3. Download the script (partially recommended)

You can download the script from releases at the root of your website, rename it to something less suspicious and import it in your layout:

<script type="module" defer src="your-potato-random-file.js"></script>

This can be easily detected manually by users, so it is not recommended.

4. Use the CDN (not recommended)

πŸ’‘ Why not using CDN? Because adblockers can easily block the CDN URL. You can host the file on your own server and randomize the name to avoid detection (see above). Remember to rotate the file name every week or so, or Adblock users (and lists) will be able to block it.

You can use the CDN to import the script in your layout:

<script src="https://cdn.jsdelivr.net/gh/The-3Labs-Team/potatoshield@main/dist/potatoshield.min.ob.js"></script>

Make it undetectable

To make potatoshield undetectable by adblockers, Open in GitHub Codespaces or clone the repo.

After that, open a terminal and run the following command:

npm run build

This will generate a minified and obfuscated script in the dist folder called potatoshield.min.ob.js. You can add it (method 1) or rename this file (method 3) to something less suspicious and host it on your server.

About

πŸ₯” Detects ad blockers and shows a banner to encourage users to disable them.

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Code of conduct

Security policy

Stars

Watchers

Forks