Post Reply 
Blocklist Additions
Jun. 08, 2009, 05:53 PM (This post was last modified: Jun. 08, 2009 05:54 PM by ProxRocks.)
Post: #31
RE: Blocklist Additions
(Jun. 07, 2009 10:00 PM)sidki3003 Wrote:  Here is that site-specific filter. I have placed it above "Remove: Specific Functions on sel. Sites". In Advanced Mode the filter hits are listed in the "comments" flyover. In Debug Mode they are shown inline.

The IncludeExclude list notation is:
Code:
your.site.com    $SET(sComment=§<c1 begin§>c1 end§<start c2§>stop c2§<c3§>c3§)


I've replaced it with WIP2, which only looks for adjacent open/close pairs.
The very last trailing "§" isn't needed anymore in WIP2 (but doesn't hurt either).
So: $SET(sComment=§<open 1§>close 1§<open 2§>close 2)

this filter is quickly becoming a godsend...
you'd be surprised how much use i get out of the sAdKey variable in my IncExc-U to block site-specific tag classes and IDs...

my news.yahoo.com alone has 19 entries...
it's one of the easiest ways to bring order back to chaotic sites, lol...
Add Thank You Quote this message in a reply
Jun. 08, 2009, 06:24 PM
Post: #32
RE: Blocklist Additions
Good! My problem is exactly the opposite: I don't know where to apply it by default.
All such comment-blocks i have made notes of a few years back have either disappeared or mutated or are now blocked by the generic comment filters.

I have just looked at some free hosting services like Myspace, but the filter isn't applicable there either. Anyone has any example uses for me that might be of public interest?



WIP3 only looks for one-liners (possible initial whitespace limited to spaces and tabs), saving it from having to scan e.g.:
Code:
<script>
<!--
var foo = true;
-->
</script>

In case the filter should indeed also match:
Code:
<!--
my comment start
-->

... (should it?) then one alternative would be to prevent it from matching inside <style> and <script> tag blocks.
Add Thank You Quote this message in a reply
Jun. 08, 2009, 06:53 PM
Post: #33
RE: Blocklist Additions
(Jun. 08, 2009 06:24 PM)sidki3003 Wrote:  Good! My problem is exactly the opposite: I don't know where to apply it by default.

pretty much the same problem then, not "opposite"...
i block things that i "know" the general populous would not - so the problem is essentially the "same" (ie, this can't be blocked by default, but boy would i love to block it for my own preferences...)
Add Thank You Quote this message in a reply
Jun. 08, 2009, 07:30 PM
Post: #34
RE: Blocklist Additions
(Jun. 08, 2009 06:24 PM)sidki3003 Wrote:  WIP3 only looks for one-liners (possible initial whitespace limited to spaces and tabs), saving it from having to scan

the one-liner (w/ poss. whitespace) approach does sound like the "safest" approach...
Add Thank You Quote this message in a reply
Jun. 09, 2009, 01:39 AM
Post: #35
RE: Blocklist Additions
(Jun. 08, 2009 01:25 PM)sidki3003 Wrote:  I like Plan B's, but this one would be risky. That's because huge block-worthy comment blocks usually contain further comments within. You couldn't control at which point our forced comment ends.
How about setting a global variable when going into Plan B and then removing every comment statement until we find the proper closing comment?

sidki3003 Wrote:then one alternative would be to prevent it from matching inside <style> and <script> tag blocks.
I prefer this way.
Add Thank You Quote this message in a reply
Jun. 09, 2009, 12:28 PM
Post: #36
RE: Blocklist Additions
(Jun. 09, 2009 01:39 AM)whenever Wrote:  How about setting a global variable when going into Plan B and then removing every comment statement until we find the proper closing comment?

That's possible. However, it would have the same result as mentioned in post 27: A change in the targeted comment and then BAM!


Quote:
sidki3003 Wrote:then one alternative would be to prevent it from matching inside <style> and <script> tag blocks.
I prefer this way.

Why?

I have chosen this solution because it was the best option for "<!> Remove: Comment-Block Ads I / II", being noticeably slower when having to search across line breaks.

Furthermore, if we exclude script/style tags, we can't match code like below anymore. ("<!--" being a rarely documented but valid comment in JS.)

Code:
<script>
// harmless code
<!-- Begin Sitestat4 Technical code -->
// tracking code
<!-- End Sitestat4 Technical code -->
// harmless code
</script>

...although i currently don't have a single example for this scenario.

In short: I don't have a clear opinion about that yet, because i'm lacking real usage examples. If suggestions, please explain, with examples if possible.
Add Thank You Quote this message in a reply
Jun. 09, 2009, 02:49 PM
Post: #37
RE: Blocklist Additions
A bookmarklet to show the comments in a web site easier:

Code:
javascript:if(frames.length>1)alert('Sorry,%20frames%20detected.');else{strdoc=document.body.innerHTML.split(/\<!--/g);strcmnt='';for(i=0;i<strdoc.length;i++){pos=strdoc[i].indexOf('-->');if(pos>0){strcmnt+='<xmp><!-'+'-'+strdoc[i].substring(0,pos+3)+'</xmp><br>\n';}}win=open('','','resizable,scrollbars');with(win.document){writeln('<b>Comments</b><br>');writeln(strcmnt);close();}}
Add Thank You Quote this message in a reply
Jun. 09, 2009, 03:13 PM
Post: #38
RE: Blocklist Additions
Or use the "Toggle Comments" item in the Proxomitron menu.
Add Thank You Quote this message in a reply
Jun. 09, 2009, 03:53 PM
Post: #39
RE: Blocklist Additions
Ups, i am isolated Sidki hehehe Big Teeth
Add Thank You Quote this message in a reply
Jun. 10, 2009, 02:13 AM
Post: #40
RE: Blocklist Additions
(Jun. 09, 2009 12:28 PM)sidki3003 Wrote:  Why?

I have chosen this solution because it was the best option for "<!> Remove: Comment-Block Ads I / II", being noticeably slower when having to search across line breaks.

Furthermore, if we exclude script/style tags, we can't match code like below anymore. ("<!--" being a rarely documented but valid comment in JS.)
You are right. Wink
Add Thank You Quote this message in a reply
Jun. 16, 2009, 08:57 PM (This post was last modified: Jun. 16, 2009 09:57 PM by sidki3003.)
Post: #41
RE: Blocklist Additions
I'll include discussed filter with the next alpha config update. Here is my proposed description for the Exceptions lists:

Code:
## remove specific comment-blocks        $SET(sComment=§<c begin§>c end)
##
## Precede each opening comment with "§<" and the corresponding adjacent
## closing comment with "§>".  You just need to match the beginning of the
## target string.
##
## Example:
##   To remove following comment-blocks at http://www.2baksa.net/ :
##       <!-- Reklama Popander1 --> ... <!-- /Reklama Popander1 -->
##       <!-- Reklama -->           ... <!-- /Reklama -->
##       <!-- 24new.Ru inform -->   ... <!-- 24new.Ru inform -->
##       <!-- MarketNews Start -->  ... <!-- MarketNews End -->
##
##   ... you would add this entry (don't start new lines with a section sign):
##       www.2baksa.net/    $SET(sComment=§<Reklama§>/Reklama§<
##         24new.Ru§>24new.Ru§<MarketNews Start§>MarketNews End)
## ----------------------------------------------------------------------------
Add Thank You Quote this message in a reply
Jul. 02, 2009, 03:54 AM (This post was last modified: Jul. 02, 2009 06:52 AM by whenever.)
Post: #42
RE: Blocklist Additions
Regarding the code in filter: Remove: Specific Comment-Blocks on sel. Sites 09.06.08 [sd] (d.0):
Code:
<!--(^ PROX[:-])[ \t]+([^>\r\n]++{1,60})\0

How about changing ++ to +? The following match code is * and since ++ is lazy, it will cause many back tracking and then is not as efficient as +.
Add Thank You Quote this message in a reply
Jul. 02, 2009, 03:17 PM (This post was last modified: Jul. 02, 2009 04:44 PM by sidki3003.)
Post: #43
RE: Blocklist Additions
Yes, much better. Below filter is for the alpha.

Code:
[Patterns]
Name = "Remove: Specific Comment-Blocks on sel. Sites     09.07.02 [sd] (d.0)"
Active = TRUE
URL = "$TST(hCT=*html)$TST(sComment=*)"
Limit = 32766
Match = "<!--(^ PROX[:-])[ \t]+([^>\r\n]+{1,60})\0"
        "$TST(sComment=((^$TST(\2=*))*§<\1§>([^§]+)\3$TST(\0=(($TST(\1)*)\2|*)))+*)"
        "$TST(\2=*)*<!--[ \t]+$TST(\3)*-- >"
        "&"
        "$SET(eAdComm=$GET(eAdComm)%3Cspan class=%22ProxFly-Span%22%3E$GET(mHead) S :%3C/span%3E"
        "   $ESC(\2 ... \3)%3Cbr class=%22ProxFly-Br%22 /%3E)"
        "&"
        "$SET(1=$TST(keyword=(^$TST(tFrameset=*))*.i_level:5.*)"
        "<span class="Prox ProxComment" style="display:$GET(displayD)">"
        "&#8226;&#160;S-Spec&#160;Comment: \2 ... \3</span>)"
        "&"
        "($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB SiteSpec_Comment\t\2 ... \3 \t\u)|)"
Replace = "\1"
Add Thank You Quote this message in a reply
Jul. 13, 2009, 05:18 PM
Post: #44
RE: Blocklist Additions
Lifehacker has updated their comments system, and they're not showing because the timer's being stopped.

Code:
lifehacker.com    $SET(0=i_timer:3.)

Test: http://lifehacker.com/5312820/five-best-...ring-tools
Visit this user's website
Add Thank You Quote this message in a reply
Jul. 14, 2009, 04:07 AM
Post: #45
RE: Blocklist Additions
confirmed & added Smile!
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: