我在this问题上看到,AdBlock可以被检测到,例如
function blockAdblockUser() {
if ($('.myTestAd').filter(':visible').length == 0) {
// All are hidden, or "not visible", so:
// Redirect, show dialog, do something...
} else if ($('.myTestAd').filter(':hidden').length > 0) {
// Maybe a different error if only some are hidden?
// Redirect, show dialog, do something...
}
}但是,有没有任何方法来检测这个人正在使用的AdBlock类型?
发布于 2014-12-17 21:32:15
不可靠。广告阻滞剂的设计并不容易检测和区分。此外,在客户端上运行的代码是fundamentally unsafe;如果它使用户感到困扰,或者开发广告阻止器的人认为它可能被假定为被用来打扰某人,那么强大的用户可以也会颠覆它。
您可能可以通过更改广告名称(或使用阻止方可能阻止或不阻止的虚假“广告”)来识别用户正在阻止的模式列表,但该信息将迅速老化,因为大多数此类列表都会频繁更新。他们中的一些人出于兼容性的原因,用白名单做假广告。
https://stackoverflow.com/questions/27534862
复制相似问题