X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=default.filter;h=df79e5e923a9d11ac1bda4766a6734dbe8df2527;hp=aa9050df00cfddef4dd718ae972aba1753b837d9;hb=abeb270803c84f18699423993ac24f19374a02ad;hpb=57c8513fa8cd0f05f49fea01147f056d29c34e4b diff --git a/default.filter b/default.filter index aa9050df..df79e5e9 100644 --- a/default.filter +++ b/default.filter @@ -2,11 +2,11 @@ # # File : $Source: /cvsroot/ijbswa/current/default.filter,v $ # -# $Id: default.filter,v 1.22 2006/10/04 19:17:14 fabiankeil Exp $ +# $Id: default.filter,v 1.34 2006/12/12 17:32:23 fabiankeil Exp $ # # Purpose : Rules to process the content of web pages # -# Copyright : Written by and Copyright (C) 2001 - 2004 the +# Copyright : Written by and Copyright (C) 2001 - 2006 the # Privoxy team. http://www.privoxy.org/ # # We value your feedback. However, to provide you with the best support, @@ -82,7 +82,8 @@ s|(?:\w+\.)+referrer|"Not Your Business!"|gisU # The status bar is for displaying link targets, not pointless blahblah # -s/(\W\s*)((this|window)\.(default)?status)\s*=\s*((['"]).*?\6)/$1if(typeof(this.href) != 'undefined') $2 = $5 + ' URL: ' + this.href;else return false/ig +s/(\W\s*)((this|window)\.(default)?status)\s*=\s*((['"]).*?(? tags to make the banners-by-* filters more effective # ################################################################################# -FILTER: img-reorder Reorder attributes in <img> tags to make the banners-by-* filters more effective +FILTER: img-reorder Reorder attributes in tags to make the banners-by-* filters more effective # In the first step src is moved to the start, then width is moved to the second # place to guarantee an order of src, width, height. @@ -208,7 +209,7 @@ FILTER: img-reorder Reorder attributes in <img> tags to make the banners-by-* s|]*) src\s*=\s*(['"])([^>\\\2]+)\2|]*) src\s*=\s*([^'">\\\s]+)|\\\\2]+\2\|[^'">\\\s]+?))([^>]*)width\s*=\s*(["']?)(\d+?)\4|\\\\2]*\2\|[^'">\\\s]+?))([^>]*)\s+width\s*=\s*(["']?)(\d+?)\4|\\\\2]+\2\|[^'">\\\s]+?))([^>]*)width\s*=\s*(["']?)(\d+? FILTER: banners-by-size Kill banners by size # 88*31 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)88\4)[^>]*?(height=(['"]?)31\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)88\4)[^>]*?(height=(['"]?)31\6)[^>]*>@@sig # 120*60, 120*90, 120*240, 120*600 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)120\4)[^>]*?(height=(['"]?)(?:600?|90|240)\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)120\4)[^>]*?(height=(['"]?)(?:600?|90|240)\6)[^>]*>@@sig # 125*125 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)125\4)[^>]*?(height=(['"]?)125\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)125\4)[^>]*?(height=(['"]?)125\6)[^>]*>@@sig # 160*600 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)160\4)[^>]*?(height=(['"]?)600\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)160\4)[^>]*?(height=(['"]?)600\6)[^>]*>@@sig # 180*150 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)180\4)[^>]*?(height=(['"]?)150\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)180\4)[^>]*?(height=(['"]?)150\6)[^>]*>@@sig # 234*60, 468*60 (Most Banners!) -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)(?:234|468)\4)[^>]*?(height=(['"]?)60\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)(?:234|468)\4)[^>]*?(height=(['"]?)60\6)[^>]*>@@sig # 240*400 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)240\4)[^>]*?(height=(['"]?)400\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)240\4)[^>]*?(height=(['"]?)400\6)[^>]*>@@sig # 250*250, 300*250 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)(?:250|300)\4)[^>]*?(height=(['"]?)250\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)(?:250|300)\4)[^>]*?(height=(['"]?)250\6)[^>]*>@@sig # 336*280 -s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)336\4)[^>]*?(height=(['"]?)280\6)[^>]*>@@sig +s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)336\4)[^>]*?(height=(['"]?)280\6)[^>]*>@@sig # Note: 200*50 was also proposed, but it probably causes too much collateral damage: # -#s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)200\4)[^>]*?(height=(['"]?)50\6)[^>]*>@@sig +#s@\\\1\s]+)\1)?[^>]*?(width=(['"]?)200\4)[^>]*?(height=(['"]?)50\6)[^>]*>@@sig ################################################################################# @@ -268,11 +269,11 @@ s@\1\s]*?(?:\ | tracker | counter # common \ | adlog\.pl # see sf.net \ )[^>\1\s]*)\1[^>]*>\s*\\\3\s]+)\3)?[^>]*((?:width|height)\s*=\s*(['"]?)\d+?\6)[^>]*((?:width|height)\s*=\s*(['"]?)\d+?\8)[^>]*>\ -@@sigx +@@sigx # Rare case w/o explicit dimensions: # -s@\1\s]*?(?:adclick|atwola\.com/(?:link|redir)|doubleclick\.net/jump/|tracker|counter|adlog\.pl)[^>\1\s]*)\1[^>]*>\s*\\\3\s]+)\3)?[^>]*>@@sig +s@\1\s]*?(?:adclick|atwola\.com/(?:link|redir)|doubleclick\.net/jump/|tracker|counter|adlog\.pl)[^>\1\s]*)\1[^>]*>\s*\\\3\s]+)\3)?[^>]*>@@sig ################################################################################ @@ -282,7 +283,7 @@ s@\1\s]*?(?:adclick|atwola\.com/(?:link|redir)|double ################################################################################# FILTER: webbugs Squish WebBugs (1x1 invisible GIFs used for user tracking) -s/]*(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*?>//siUg +s@]*\s(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*\s(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*?>@@siUg ################################################################################# @@ -303,8 +304,7 @@ s/(]*?)wrap=(['"]?)hard\2/$1/ig ################################################################################# FILTER: jumping-windows Prevent windows from resizing and moving themselves -s/(?:window|this|self)\.(?:move|resize)(?:to|by)\(/''.concat(/ig - +s/(?<=[\W])(?:window|this|self)\.(?:move|resize)(?:to|by)\(/''.concat(/ig ################################################################################# # @@ -390,7 +390,7 @@ FILTER: fun Text replacements for subversive browsing fun! # SCNR # -s/microsoft(?!.com)/MicroSuck/ig +s/microsoft(?!.[^\s])/MicroSuck/ig # Buzzword Bingo (example for extended regex syntax) # @@ -496,6 +496,15 @@ s|(]*)onload|$1never|sig s|( and tags. +# +################################################################################# +FILTER: no-ping Removes non-standard ping attributes in and tags. +s@(]*?)\sping=(['"]?)([^"'>]+)\2([>\s]?)@\ +PING!\n$1$4@ig + ################################################################################# # # google: CSS-based block for Google text ads. Also removes @@ -506,12 +515,15 @@ FILTER: google CSS-based block for Google text ads. Also removes a width limitat s@@\n$0@ s@
@
@ s@(
@\n$0@ + \#symadbn, \#ymadbn, .yschbox, \#yschsec, .yschhd, \#yschanswr, .yschftad,\ + .yschspn, .yschspns, \#ygrp-sponsored-links {display: none !important;}\n\ + \#yschpri, \#yschweb {width: 100% !important; max-width: 100% !important;}\n\ + \#yschqcon, \#yschtg {width: auto !important; /* No useless horizontal scrollbar please */}\n\ +\n$0@ ################################################################################# # @@ -536,9 +550,19 @@ FILTER: msn CSS-based block for MSN text ads. Also removes tracking URLs and a w s@@\n$0@ + \#results, .flank, .results_area_flank, .results_area_stroke, .SearchSection .not\ + {width: 99% /*!important*/; min-width: 99% !important;\ + max-width: 100% !important; /* width:100% sometimes causes horizontal scrollbars */}\n\ + /* Make continue links harder to miss */\n\ + \#pagination_bottom a {padding: .3em .5em .3em .5em; border: 1px solid \#e6e6e6;}\n\ + \#pagination_bottom li, \#pagination_bottom li .selected, li .nextPage \ + {margin: 0 !important; cursor: auto; border: none; padding:.1em;}\n\ + \#pagination_bottom li .prevPage {padding-right: 1.5em !important;}\n\ + \#pagination_bottom li .selected {border: none;}\n\ + .selected a {background-color: \#d2eaf6; border: 1px solid \#b7d8ee;}\n\ + /* Remove "suggestions". They are next to worthless but partly overlap with the search results */\n\ + .suggestion, \#nys_right {clear: both; display:none;}\n\ + \n$0@ s@(]*) id=(["']?)ads_[^\2]*\2@$1 class="msn_ads"@Uig s@(]*href=\")http://g.msn.com/.*\?(http://.*)(&&DI=.*)(\")@$1$2$4@Ug s@(]*)gping=\".*\"@$1 title="URL cleaned up by Privoxy's msn filter"@Ug @@ -564,12 +588,24 @@ s@@\n$0@ -s@|(