First you need to create advertisement.js file on your hosting. It is important that it is called that way because adblocking software will triggered by it. Put this code in it:
Now you have to insert this code right under <body> tag: With this code you will redirect users to your landing page where you can ask them to disable adblocking software in order to approach your page. This second part of this code can be edited any way you want and I will show it to you later in this post.
And as final part you have to insert this code into your CSS file or into <style></style> in head of your HTML: So this is it. You have AdBlock detector on your site.
And now if you don't want to redirect users to landing page you can just warn them with pop up or with one paragraph. To do that you have to remove this part from original code:
And replace it with this code for pop up: And for paragraph you have to replace it with this code: Of course, if you use paragraph as a warning, you have to place second part of original code where you want it to be.