*** empty log message ***
[privoxy.git] / re_filterfile
1 # Filterfile for the Regular Substitution Module
2 #
3 # Syntax: One Perl-Style substitution per line.
4 # For Details see the perlre, perlop and pcre manpages.
5 # Note that you are free to choose the delimter as you
6 # see fit.
7 #
8
9 # Kill OnUnload popups. Yummy.
10 # check it out on http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
11 #
12 s/(<body .*?)onunload(.*?>)/$1never$2/i
13
14 # Kill refresh tags. I like to refresh myself. Manually.
15 # check it out on http://www.airport-cgn.de/ and go to the arrivals page.
16 #
17 s/<meta[^>]*http-equiv[^>]*refresh[^>]*>/<!--no refresh for me-->/i
18 s/<meta[^>]*http-equiv="?page-enter"?[^>]*content=[^>]*>/<!--no page enter for me-->/i
19
20 # If I allow popups, I want them to be rezizable and have a location and status bar:
21 # check it out on http://www.airport-cgn.de/ and go to the arrivals page.
22 #
23 s/resizable="?(no|0)"?/resizable=1/ig
24 s/noresize/yesresize/ig
25 s/location="?(no|0)"?/location=1/ig
26 s/status="?(no|0)"?/status=1/ig
27 s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
28 s/menubar="?(no|0)"?/menubar=1/ig
29 #s/framespacing="?(no|0)"?//ig
30 #s/margin(height|width)=[0-9]*//gi
31
32 # Remove frameborder=0 and border=0 from framesets
33 s/(<frameset[ -z]+)(frame)?border="?(no|0)"?/$1/ig
34
35 # The status bar is for displaying link targets, not pointless buzzwords.
36 # Again, check it out on http://www.airport-cgn.de/
37 #
38 s/status='.*?';*//ig
39
40 # Kill *all* popups a la popup.c. (But for *all* sites, so I wouldn't do that.)
41 #
42 # JavaScript: s/window\.open\(/who_wants_this_to.open(/ig
43 # HTML      : s/target="?_blank"?/target_who/g
44
45 # Fun stuff:
46 #
47 s/microsoft(?!.com)/<b>MicroSuck<\/b>/ig
48
49 # Crude parental filtering?  (Use along with a suitable blocklist).
50 # Shows how to deny access to whole page based on a keyword.
51 #
52 # (Note: Middlesex, Sussex and Essex are counties in the UK, not rude words)
53 # (Note #2: Is 'sex' a rude word?!)
54 #
55 #s%^.*(?<!middle)(?<!sus)(?<!es)sex.*$%<html><head><title>Blocked</title></head><body><h3>Blocked due to possible adult content. Please see <a href="http://dmoz.org/Kids_and_Teens/">this site</a>.</h3></body></html>%is
56 #s+^.*warez.*$+<html><head><title>No Warez</title></head><body><h3>You're not searching for illegal stuff, are you?</h3></body></html>+is
57
58 # http://www.farscapezone.com/wwwboard/messages/1451.html
59 s/(\w+) was tired/<b>$1 needed more coffee<\/b>/ig
60
61 # I'm sure you'll find more uses.
62 # Please send your cool additions to junkbuster-users@yahoogroups.com