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.
- 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)
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.
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 |
// TODO
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.
You have four methods to use potatoshield on your website:
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>
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.
π‘ 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>
To make potatoshield undetectable by adblockers, 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.