Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I add an Ad Blocker notice and Ad Plugin
#1
I was wondering is there a way I can add a Disable ad blockers notice and is there any Ad Plugin I use to display that message?
Reply
#2
Add adblocker script
in header ..no plugin needed !
Reply
#3
I want something like a Plugin once they disable the Ad Blockers and ads displays.
Reply
#4
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.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#5
(12-10-2018, 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.
Reply
#6
(12-11-2018, 03:50 AM)WallBB Wrote:
(12-10-2018, 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.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: 5M7sb0n.png?1]
Reply
#7
thank you guys for an answer but is there an Plugin for the javascript?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)