Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
http://www.thepcspy.com/read/how_to_block_adblock
并不是说你应该这样做。这是令人难以置信的反消费主义,在我看来,这显然是愚蠢的。
http://www.thepcspy.com/read/how_to_block_adblock
Not that you should EVER do it. It's incredibly anti-consumerist and IMO, plainly stupid.
只需在将被 AdBlock 阻止的内容中创建网站内容,并将此消息保留在后台即可。
另一方面,您可以尝试使用 JavaScript 获取元素的状态,但我不确定这是否有效。
Just create the content of the site within something which will be blocked by AdBlock, and leave this message on the background.
On the other hand, you could try to get the status of an element using JavaScript, but I'm not sure if this is working.
就我个人而言,我不会阻止 adblock 用户访问我的网站 - 互联网是有自由的。由于我的网站允许您自由地表达和讨论您想要的内容,那么这样做就是虚伪的。
不过话虽如此,如果人们确实访问过,那么他们可以关闭我网站页面的广告拦截,我将不胜感激。我没有像大公司和商店那样拥有大量资金来运营我的网站,因此如果我必须删除来宾发帖或让我的会员支付少量订阅费,那将是一种耻辱。
一些互联网用户认为小型论坛和网站所有者通过广告发了大财 - 这是一个神话,事实上我们甚至几乎没有赚到几块钱来支付托管费用。请记住这一点,因为您最喜欢的许多网站都会赚几美元,而拿走这些宝贵的收入可能会导致您最喜欢的网站消失。
Personally I will not stop adblock users visiting my site - there is such thing as freedom of the internet. As my site allows you freedom to say and discuss pretty much what you want, then doing such a thing would be hypocritical.
However having said that I would appreciate it if people did visit then they could turn off adblock for my sites pages. I do not have the massive finances to run my site like the big corporations and stores, so it would be a shame if I did have to remove guest posting or make my members pay a small subscription.
Some Internet users assume that small forum and website owners make a fortune in advertizing - this is a myth, in fact we barely even scrape a few bucks towards the hosting costs. Please try to remember this as many of your favorite website will be making a few dollars and taking away that valuable income may see your favorite website disappear.