From: Fabian Keil Date: Sat, 1 Mar 2008 14:10:28 +0000 (+0000) Subject: Use new block syntax. Still needs some polishing. X-Git-Tag: v_3_0_9~221 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=7784992fae7c7623f95b71a2f2ef2552730220fd;ds=sidebyside Use new block syntax. Still needs some polishing. --- diff --git a/doc/source/user-manual.sgml b/doc/source/user-manual.sgml index 0198a09f..6a07d878 100644 --- a/doc/source/user-manual.sgml +++ b/doc/source/user-manual.sgml @@ -33,7 +33,7 @@ This file belongs into ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/ - $Id: user-manual.sgml,v 2.62 2008/02/11 11:52:23 hal9 Exp $ + $Id: user-manual.sgml,v 2.63 2008/02/22 05:50:37 markm68k Exp $ Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/ See LICENSE. @@ -59,7 +59,7 @@ -$Id: user-manual.sgml,v 2.62 2008/02/11 11:52:23 hal9 Exp $ +$Id: user-manual.sgml,v 2.63 2008/02/22 05:50:37 markm68k Exp $ - Boolean. + Parameterized. Parameter: - N/A + A block reason that should be given to the user. @@ -2837,15 +2837,22 @@ for details. Privoxy sends a special BLOCKED page - for requests to blocked pages. This page contains links to find out why the request - was blocked, and a click-through to the blocked content (the latter only if compiled with the - force feature enabled). The BLOCKED page adapts to the available + for requests to blocked pages. This page contains the block reason given as + parameter, a link to find out why the block action applies, and a click-through + to the blocked content (the latter only if the force feature is available and + enabled). + + A very important exception occurs if both block and handle-as-image, @@ -2874,18 +2881,18 @@ for details. Example usage (section): - {+block} + {+block{No nasty stuff for you.}} # Block and replace with "blocked" page .nasty-stuff.example.com -{+block +handle-as-image} +{+block{Doubleclick banners.} +handle-as-image} # Block and replace with image .ad.doubleclick.net .ads.r.us/banners/ -{+block +handle-as-empty-document} +{+block{Layered ads.} +handle-as-empty-document} # Block and then ignore - adserver.exampleclick.net/.*\.js$ + adserver.example.net/.*\.js$ @@ -4311,7 +4318,7 @@ new action # Block all documents on example.org that end with ".js", # but send an empty document instead of the usual HTML message. -{+block +handle-as-empty-document} +{+block{Blocked JavaScript} +handle-as-empty-document} example.org/.*\.js$ @@ -4398,11 +4405,8 @@ example.org/.*\.js$ # These don't look like images, but they're banners and should be # blocked as images: # -{+block +handle-as-image} -some.nasty-banner-server.com/junk.cgi\?output=trash - -# Banner source! Who cares if they also have non-image content? -ad.doubleclick.net +{+block{Nasty banners.} +handle-as-image} +nasty-banner-server.example.com/junk.cgi\?output=trash @@ -6193,7 +6197,7 @@ new action # +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies - +block-as-image = +block +handle-as-image + +block-as-image = +block{Blocked image.} +handle-as-image allow-all-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions @@ -6307,7 +6311,7 @@ that also explains why and how aliases are used: # +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies - +block-as-image = +block +handle-as-image + +block-as-image = +block{Blocked image.} +handle-as-image mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions @@ -6541,7 +6545,7 @@ bs*.gsanet.com ########################################################################## # Block these fine banners: ########################################################################## -{ +block } +{ +block{Banner ads.} } # Generic patterns: # @@ -6688,7 +6692,7 @@ wiki. -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies allow-all-cookies = -crunch-all-cookies -session-cookies-only allow-popups = -filter{all-popups} -kill-popups -+block-as-image = +block +handle-as-image ++block-as-image = +block{Blocked as image.} +handle-as-image -block-as-image = -block # These aliases define combinations of actions that are useful for @@ -6758,7 +6762,7 @@ stupid-server.example.com/ seen an ad on your favourite page on example.com that you want to get rid of. You have right-clicked the image, selected copy image location and pasted the URL below while removing the leading http://, into a - { +block } section. Note that { +handle-as-image + { +block{} } section. Note that { +handle-as-image } need not be specified, since all URLs ending in .gif will be tagged as images by the general rules as set in default.action anyway: @@ -6766,7 +6770,7 @@ stupid-server.example.com/ -{ +block } +{ +block{Nasty ads.} } www.example.com/nasty-ads/sponsor\.gif another.example.net/more/junk/here/ @@ -8676,21 +8680,21 @@ In file: user.action [ View ] [ Edit ] - { +block } + { +block{Domains starts with "ad"} } ad*. - { +block } + { +block{Domain contains "ad"} } .ad. - { +block +handle-as-image } + { +block{Doubleclick banner server} +handle-as-image } .[a-vx-z]*.doubleclick.net We'll just show the interesting part here - the explicit matches. It is - matched three different times. Two +block sections, - and a +block +handle-as-image, + matched three different times. Two +block{} sections, + and a +block{} +handle-as-image, which is the expanded form of one of our aliases that had been defined as: +block-as-image. (Aliases are defined in @@ -8705,7 +8709,7 @@ In file: user.action [ View ] [ Edit ]ad.doubleclick.net is done here -- as both a +block + linkend="BLOCK">+block{} and an +handle-as-image. The custom alias +block-as-image just @@ -8785,7 +8789,7 @@ In file: user.action [ View ] [ Edit ] @@ -8827,7 +8831,7 @@ In file: user.action [ View ] [ Edit ] - { +block +handle-as-image } + { +block{Path starts with "ads".} +handle-as-image } /ads @@ -8943,6 +8947,9 @@ In file: user.action [ View ] [ Edit ]