Page 1 of 1

how to block <script>document.write.....</script>

Posted: Sat Jul 21, 2007 5:59 am
by pythonlong
some ads are written in <script> </script> use document.write();

how to block this .

3ks

example

Posted: Sat Jul 21, 2007 7:17 am
by pythonlong
such as:

<script>document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank><font color=red>七喜笔记本3999送手机</font></a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>神舟1G内存64位本3999</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>暑期DIY装机促销全攻略</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>iPhone和诺记N95你顶谁</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>抢先拆解1G显存DX10显卡</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>XFX超豪华主板抢先评测</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>自助装机配置专家点评</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>DIY最新最佳性价产品荐</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>节后高性价比5K以下新本推荐</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>07年度常用装机软件大全</a><br></span>');
_addIvyID("107777_38507");
_addIvyID("107777_36869");
_addIvyID("107777_581");
_addIvyID("107777_36768");
_addIvyID("107777_36769");
_addIvyID("107777_35931");
_addIvyID("107777_35930");
_addIvyID("107777_10437");
_addIvyID("107777_10436");
_addIvyID("107777_582");</script>

Posted: Sat Jul 21, 2007 10:45 am
by fanboy
tried just blocking, */adpuba/* or *?adid=* ?

Posted: Sat Jul 21, 2007 5:35 pm
by Adblock Plus Fan
fanboy wrote:*/adpuba/* or *?adid=*
I understand that you might have suggested *?adid=* in case */adpuba/* gives false positives. But if this is the case then *click?adid=* is much better alternative for this situation since it is much faster.
pythonlong wrote:<script>document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank><font color=red>七喜笔记本3999送手机</font></a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>神舟1G内存64位本3999</a><br></span>');
document.write('<span>·<a href=http://ivy.pconline.com.cn/adpuba/click ... wzld.tl1xf. target=_blank class=p1>暑期DIY装机促销全攻略</a>
I also think you might need to turn on Check Banner Links options if you want to use these urls for blocking.

Posted: Sat Jul 21, 2007 11:25 pm
by fanboy
Adblock Plus Fan wrote:
fanboy wrote:*/adpuba/* or *?adid=*
I understand that you might have suggested *?adid=* in case */adpuba/* gives false positives. But if this is the case then *click?adid=* is much better alternative for this situation since it is much faster.
Strictly concerning the website he's visiting, either filter would work fine. I'm not sure how */adpuba/* would give you many false positives compared to *?adid=*. Of course I could be wrong. Example?

Personally, I'd use *?adid=* since it would be more useful on other websites.

Posted: Sun Jul 22, 2007 1:28 am
by rick752
Do some of these work ok? Maybe they will give you a push in the right direction:

Code: Select all

ivy.pconline.com.cn/adpuba/
image.pconline.com.cn*/200
pconline.com.cn#div(class=top_banner)
pconline.com.cn#div(class*=-img)
pconline.com.cn#div(class=right1-1)
pconline.com.cn#div(class^=sc)
ps: I did this very quickly AND I don't read the language.

Posted: Sun Jul 22, 2007 5:49 am
by Adblock Plus Fan
fanboy wrote:Strictly concerning the website he's visiting, either filter would work fine.
Not true. One filter you suggest is a fast filter (*/adpuba/*), the other is a slow filter (*?adid=*).
Suggesting slow filters to people who might not know about that issue without some sort of note is not good in my opinion, especially not when there are alternatives.
fanboy wrote:I'm not sure how */adpuba/* would give you many false positives compared to *?adid=*. Of course I could be wrong. Example?
Note that I said might, meaning possibly. This was more of a guessing from my part which considered why you would do something like suggesting a slow filter when the situation clearly allows faster alternatives.
fanboy wrote:Personally, I'd use *?adid=* since it would be more useful on other websites.
But if this is your reasoning then we disagree. Suggesting a slow filter filter to other people on the basis that it might also block other ads on other websites is not good in my opinion. At least not without notifying them that it is a slow filter.

Posted: Sun Jul 22, 2007 7:48 am
by fanboy
Adblock Plus Fan wrote:But if this is your reasoning then we disagree. Suggesting a slow filter filter to other people on the basis that it might also block other ads on other websites is not good in my opinion. At least not without notifying them that it is a slow filter.
Its the whole effective filter vs efficient filter, its up to the user to decide. An efficient filter that hardly gets any hits, vs an effective filter. If the filter requires another 1-2ms and blocks many more adverts from many other sites, then I'd choose the effective filter everytime, but that is my personal opinion. I don't have to benchmark my suggestions, just to make you happy. In the end, its up to the user (pythonlong) to decide what is the most effective filter for the job.

Posted: Sun Jul 22, 2007 8:45 am
by Adblock Plus Fan
fanboy wrote:An efficient filter that hardly gets any hits, vs an effective filter.
Saying that it "hardly gets any hits" is hardly fair. It gets all the hits you have required from it.

Besides as a filterlist author you should know there are more than one side to the "effective"/aggressive filters. Having the filters defined more specifically is not necessarily a bad thing.
fanboy wrote:I don't have to benchmark my suggestions, just to make you happy.
I never asked you to.
fanboy wrote:In the end, its up to the user (pythonlong) to decide what is the most effective filter for the job.
Indeed. Which is why I recommended to at least make him aware of the differences in speed.

Afaik they can have roughly three orders of magnitude in speed difference in certain situations, something worth considering.
fanboy wrote:If the filter requires another 1-2ms and blocks many more adverts from many other sites, then I'd choose the effective filter everytime, but that is my personal opinion.
As you suggested this is merely a difference in philosophy. In my opinion, it is better to have 100 fast filters than a single very slow but "effective" filter.

When combined, the 100 filters are faster as well as highly likely to be more effective.

And even though this will be a drop in the bucket for individual situations like these, I think this difference in philosophy is certainly relevant and has a big impact on the way big filerlists end up.