Open lightbox when Adblocker is active

The code sample from Ido on that page only tells you if Adblocker is active or not.

I found a way to detect if an adblock is enabled or not. Simply try fetching an ads javascript file.

Note that this code must be executed in frontend code

Add a text element and set its text to “Adblock is ON”

Then add the following code:

import {fetch} from 'wix-fetch';

$w.onReady(function () {
	fetch('https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', {
		mode: 'no-cors'
	}).then(() => {
		$w('#text1').text = "Adblock OFF";
	});
});

You will probably find that a Adblocker will block any lightbox popup until it is turned off, so you might have to use a simple hidden box on your actual page itself and not try to use a lightbox which will not be opened.

You can see how to do it here.

You can also see this page about it too.