Last update :
AdBlocker is a utility that filters content or blocks browser ads. It helps users to prevent unwanted ads and pop-ups. But a website that earns mainly through advertising will need to notify users to turn off AdBlock to display ads because it reduces the website's income.
And this article, as you can see in the thumbnail, will have a dialog pop up informing the visitor that they are using AdBlock. If the user has AdBlocker enabled then this message will be displayed and otherwise it will not be displayed.
Step 1: Add the below HTML code before the closing tag </body>.
<divid='ch-detect'></div><divclass='ch-bg-effect'></div><divclass='ch-popup-box'><divclass='content'><divclass='warn-icon'><spanclass='icon'><iclass='has-svg-icon icon-exclamation'></i></span></div><h2>AdBlock Detected!</h2><p>Our website is made possible by displaying ads. Please whitelist our site to copy the given source codes. <ahref='#!'target='_blank'>Read more</a></p><buttonclass='dismiss-btn'>Okay, I'll Whitelist</button></div></div>
Step 2: Add the following JavsScript code below the inserted HTML.
I feel like this is a bit annoying for users when accessing articles with paid content because the article is already paid and no longer needs advertising. Please combine for free content, like my Blog, when you turn on AdBlock, you will not be able to copy the code directly from your Blog, you can try if you use AdBlock. Please use it reasonably to avoid causing inventory!