2018-12-07, 08:03 PM
2018-12-08, 03:49 AM
Add adblocker script
in header ..no plugin needed !
in header ..no plugin needed !
2018-12-10, 01:36 PM
I want something like a Plugin once they disable the Ad Blockers and ads displays.
2018-12-10, 08:00 PM
Usually how people do it is you have a div on your page that has the message about ads:
Then you'll have a file called ads.js which hides the message:
This works because if the user has an ad-blocker installed, it won't load ads.js so the message will stay on the page, and if they don't have an ad-blocker, it will load ads.js and hide the message.
<div class="blocker-notice">Please turn off your ad blocker</div>
Then you'll have a file called ads.js which hides the message:
$('.blocker-notice').remove();
This works because if the user has an ad-blocker installed, it won't load ads.js so the message will stay on the page, and if they don't have an ad-blocker, it will load ads.js and hide the message.
2018-12-11, 03:50 AM
(2018-12-10, 08:00 PM)Matt Wrote: [ -> ]Usually how people do it is you have a div on your page that has the message about ads:
<div class="blocker-notice">Please turn off your ad blocker</div>
Then you'll have a file called ads.js which hides the message:
$('.blocker-notice').remove();
This works because if the user has an ad-blocker installed, it won't load ads.js so the message will stay on the page, and if they don't have an ad-blocker, it will load ads.js and hide the message.
This is the best solution, I will like to suggest an enhancement to this answer.
Suppose a user has also disabled javascript then the above solution will not work.
You should also add a <noscript> tag so that if user has disabled javascript, then they will need to enable javascript first.
2018-12-11, 04:50 AM
(2018-12-11, 03:50 AM)WallBB Wrote: [ -> ](2018-12-10, 08:00 PM)Matt Wrote: [ -> ]Usually how people do it is you have a div on your page that has the message about ads:
<div class="blocker-notice">Please turn off your ad blocker</div>
Then you'll have a file called ads.js which hides the message:
$('.blocker-notice').remove();
This works because if the user has an ad-blocker installed, it won't load ads.js so the message will stay on the page, and if they don't have an ad-blocker, it will load ads.js and hide the message.
This is the best solution, I will like to suggest an enhancement to this answer.
Suppose a user has also disabled javascript then the above solution will not work.
You should also add a <noscript> tag so that if user has disabled javascript, then they will need to enable javascript first.
Yes, that should be implemented as well.
I do have the AdBlocker app installed on my desktop and other devices.
So, if I enter a website that tells me that in order for me to view a video or movie, I have to disable the AdBlocker. So, I do that...
I view the video or movie... once that is done, then I re-enable the AdBlocker app again and I go on my merry way.
2018-12-11, 06:49 PM
thank you guys for your help!