广告拦截器检测AKA Adblock Plus [英] Ad Blocker detection AKA Adblock Plus

查看:99
本文介绍了广告拦截器检测AKA Adblock Plus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

搜索Google和Stackoverflow几个小时后,我找不到解决方案。
我想要做的是检测Adblock plus并且现在显示一条简单的消息。



我想要做的是检测Adblock加上没有使用JavaScript文件或jQuery。
他们使用文件的大部分adblock加检​​测脚本,例如show_ads.js,该文件托管在自己的域中,并将其设置为adblock = false;

使用JavaScript文件的问题,用户可以将该文件列入白名单,并且它将不再检测到该文件。我正在寻找的是一个直接加载到HTML中的JavaScript,它可以检测到有人在不使用文件的情况下使用了广告拦截器。



下面的示例: / p>

 < script type =text / javascript> 
//检测使用广告拦截器的代码行

如果是这样的话显示消息
< / script>

这样做的原因是没有广告拦截器可以白名单上的JavaScript服务器上的文件。是的,我知道还有其他的方法来解决这个与NoScript插件,但我已经有一个解决方案。我有一个伟大的想法,从来没有尝试过,广告拦截器无法阻止这一旦我完成它。



任何建议和示例将不胜感激。

解决方案

如果您使用第三方广告,我找到了最好的脚本之一。 $ b

antiblock.org 免责声明我与本网站无关。



它适用于大多数网站,如果他们想绕过它,他们将不得不添加他们自己的过滤器(对于普通用户而言很复杂),或者联系adblock过滤器并添加一个过滤器,但他们不会这么做该列表正在越过加载并放缓广告拦截用户。


After searching Google and Stackoverflow for a few hours I could not find a solution. What I'm trying to do is detect Adblock plus and display a simple message for now.

What I want to do is detect Adblock plus without using a JavaScript file or jQuery. Most of the adblock plus detect scripts they use a file, example "show_ads.js" that is hosted on there own domain with a line it in to set it "adblock = false;"

The problem with using a JavaScript file, users can white list that JavaScript file and it will no longer detect it. What I'm looking for is a JavaScript that loads directly into the HTML that would detect if someone is using ad blocker without the use of a file.

Example Below:

<script type="text/javascript">
 // line of code that detects if using ad blocker

 if so display message
 </script>

The reason behind doing it this way no ad blocker can white list the JavaScript file on your server. Yes I know there are other methods of getting around this with NoScript addons but I already have a solution for that. I have a great idea that has never been tried and ad blockers cannot block this once I get done with it.

Any suggestions and Examples will be greatly appreciated.

解决方案

I have found one of the best scripts if you use third party ads.

antiblock.org Disclaimer I'm not affiliated with this site in anyway.

It will work for most sites and if they want to bypass it they will have to add their own filters (complicated for normal users) or contact adblock filters and have one added but they quit doing that cause the list is getting over loaded and slowing down ad block users.

这篇关于广告拦截器检测AKA Adblock Plus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆