Fix typo + minor change.
[privoxy.git] / templates / edit-actions-list
1 ##############################################################################
2 #
3 # File        :  $Source: /cvsroot/ijbswa/current/templates/edit-actions-list,v $
4 #
5 # Purpose     :  Template used to edit the actions file.
6
7 #
8 # Copyright   :  Written by and Copyright (C) 2001-2006 the SourceForge
9 #                Privoxy team. http://www.privoxy.org/
10 #
11 #                Original Author: Copyright (C) 2001 Jonathan Foster
12 #                http://www.jon-foster.co.uk/
13 #
14 #                This program is free software; you can redistribute it 
15 #                and/or modify it under the terms of the GNU General
16 #                Public License as published by the Free Software
17 #                Foundation; either version 2 of the License, or (at
18 #                your option) any later version.
19 #
20 #                This program is distributed in the hope that it will
21 #                be useful, but WITHOUT ANY WARRANTY; without even the
22 #                implied warranty of MERCHANTABILITY or FITNESS FOR A
23 #                PARTICULAR PURPOSE.  See the GNU General Public
24 #                License for more details.
25 #
26 #                The GNU General Public License should be included with
27 #                this file.  If not, you can view it at
28 #                http://www.gnu.org/copyleft/gpl.html
29 #                or write to the Free Software Foundation, Inc., 59
30 #                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31 #
32 # Revisions   :
33 #    $Log: edit-actions-list,v $
34 #    Revision 1.30  2006/09/09 01:12:15  hal9
35 #    Soften actions files update interval.
36 #
37 #    Revision 1.29  2006/07/18 14:49:13  david__schmidt
38 #    Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
39 #    with what was really the latest development (the v_3_0_branch branch)
40 #
41 #    Revision 1.26.2.4  2003/12/17 16:35:17  oes
42 #    Work around new & silly MSIE behaviour where the request resulting from
43 #    changing window.location.href doesn't reveal the referrer anymore
44 #
45 #    Revision 1.26.2.3  2002/09/25 15:34:09  oes
46 #    - Work around JS problem in NS 2.0 (no joke)
47 #    - Make JS string edit popup remove the pattern
48 #      if edited to empty; make JS add popup do nothing
49 #      if pattern empty.
50 #
51 #    Revision 1.26.2.2  2002/08/23 02:22:53  hal9
52 #    Fix a perl brain fart with <li> in comments.
53 #
54 #    Revision 1.26  2002/05/23 23:37:25  oes
55 #    Nit
56 #
57 #    Revision 1.25  2002/05/21 21:02:52  oes
58 #    Added more help links
59 #
60 #    Revision 1.24  2002/05/21 19:11:40  oes
61 #     - Added client-side JavaScript versions of edit and add URL forms
62 #     - Moved jump targets to before container table cell
63 #     - Let earu determine the jump target when removing URLs via JS
64 #     - Fixed broken help link
65 #
66 #    Revision 1.23  2002/05/12 15:53:10  jongfoster
67 #    Restoring CVS log information accidentally removed in
68 #    my previous commit.
69 #
70 #    Revision 1.22  2002/05/12 15:45:33  jongfoster
71 #    Applying [Patch 552094] New templates for edit-actions-list
72 #    This cleans up the templates by:
73 #    - Removing the (confusing) alternating color scheme.
74 #    - Making everything left-justified.
75 #
76 #    Revision 1.21  2002/05/03 22:58:15  jongfoster
77 #    Fixing link target in all URLs section
78 #
79 #    Revision 1.20  2002/04/26 12:57:18  oes
80 #     - Central "button" link style in cgi-style.css
81 #     - Help links now dynamic
82 #
83 #    Revision 1.19  2002/04/24 02:19:16  oes
84 #     - Show name of actions file being edited
85 #     - Show context sensitive help
86 #     - Add buttons for easy changing of defaults
87 #     - Cosmetics and clarifications
88 #
89 #    Revision 1.18  2002/04/18 19:21:09  jongfoster
90 #    Added code to detect "conventional" action files, that start
91 #    with a set of actions for all URLs (the pattern "/").
92 #    These are special-cased in the "edit-actions-list" CGI, so
93 #    that a special UI can be written for them.
94 #
95 #    Revision 1.17  2002/04/10 13:32:53  oes
96 #    Made templates modular
97 #
98 #    Revision 1.16  2002/04/08 17:08:14  oes
99 #    Cosmetic: make status in title lowercase
100 #
101 #    Revision 1.15  2002/04/05 16:01:32  oes
102 #    Correct HTML, external Stylesheets, eye candy, some fixes
103 #
104 #    Revision 1.14  2002/03/26 22:29:56  swa
105 #    we have a new homepage!
106 #
107 #    Revision 1.13  2002/03/24 15:23:33  jongfoster
108 #    Name changes
109 #
110 #    Revision 1.12  2002/03/24 11:01:06  swa
111 #    name change
112 #
113 #    Revision 1.11  2002/03/23 16:18:15  swa
114 #    renamed every reference to the old name with foobar.
115 #    fixed "application foobar application" tag, fixed
116 #    "the foobar" with "foobar". left junkbuster in cvs
117 #    comments and remarks to history untouched. should
118 #    make final rename easier.
119 #
120 #    Revision 1.10  2002/03/16 15:22:19  jongfoster
121 #    Moving 'alpha' warning to the end of the page
122 #
123 #    Revision 1.9  2002/03/05 00:24:51  jongfoster
124 #    Patch to always edit the current actions file.
125 #
126 #    Revision 1.8  2002/03/03 10:29:12  swa
127 #    point users to the right feedback forms,
128 #    not necessarily the developer list.
129 #
130 #    Revision 1.7  2002/01/23 00:26:45  jongfoster
131 #    Reducing length of URLs
132 #    Where encoded and unencoded versions of a string existed, removing
133 #    the unencoded one.
134 #
135 #    Revision 1.6  2002/01/17 21:33:00  jongfoster
136 #    Replacing all references to the URL of the config interface
137 #    with @default-cgi@
138 #
139 #    Revision 1.5  2002/01/17 21:21:05  jongfoster
140 #    DOS->Unix line endings
141 #
142 #    Revision 1.4  2001/11/13 00:58:18  jongfoster
143 #    New version of actions file editor templates
144 #
145 #
146 ##############################################################################
147 #
148 # Browser support for the CSS on this page:
149 #   MS Internet Explorer 5.5 - Yes - everything works.
150 #   Netscape 6.2             - Yes - everything works.
151 #   Netscape 4.75            - No  - CSS buttons look really bad, but they are
152 #                                    usable.  Everything else works.
153 #   Opera 5.12               - Yes - everything works.
154 #   MS Internet Explorer 4+  - Untested
155 #   MS IE 3.x, NS3.x         - Untested (Don't support CSS, so everything
156 #                              should work, but will look ugly).
157 #   Mozilla >=0.6            - Yes - everything works.
158 #
159 # All browsers should work, you just might not get the pretty CSS buttons.
160 #
161 # If your favorite browser isn't listed/tested, please test and add it.
162 #
163 #
164 #############################################################################
165 #
166 # Standard support:
167 #
168 # This file currently produces valid HTML 4.01 Strict.
169 #
170 # If you change it, please save the generated page from your web browser
171 # and then upload it to http://validator.w3.org/ for checking.
172 #
173 #############################################################################
174 #
175 # Available variables include:
176 #
177 # filename
178 # ver
179 #
180 #
181 #############################################################################
182 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
183 <html>
184
185 <head>
186   <meta http-equiv="Content-Style-Type" content="text/css">
187   <meta http-equiv="Content-Script-Type" content="text/javascript">
188   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
189   <meta name="robots" content="noindex,nofollow">
190   <link rel="stylesheet" type="text/css" href="@default-cgi@send-stylesheet">
191
192   <title>Privoxy: Edit actions file @f@.action</title>
193
194   <style type="text/css">
195
196 table.framed {
197   border: solid black 1px;
198   margin: 10px 0px;
199 }
200 tr.actions {
201   background-color: #eeffee;
202 }
203 tr.url {
204   background-color: #ddddff;
205 }
206 tr.adv {
207   background-color: #FFFFD0;
208 }
209 td.header {
210   font-weight: bold;
211   font-size: 110%;
212   padding: 10px 15px 2px 15px;
213 }
214 td.url {
215   font-weight: bold;
216 }
217 td.action {
218   font-weight: bold;
219   font-style: italic;
220   padding: 2px 30px;
221 }
222 td.nbr, td.buttons {
223   white-space: nowrap;
224 }
225 td.indentbuttons {
226   padding: 2px 30px;
227 }
228 </style>
229
230 <script type="text/javascript">
231 <!--
232
233 // Non-JS capable browsers will follow the link to a HTML "are you sure?" page
234 // JavaScript-capable browsers will call this function, which does a
235 // client-side prompt for speed.  It may kick off the delete directly.
236 // It always returns false to cancel following the link.
237 function rm_p(link,pattern,curtext)
238 {
239    if (window.confirm("Are you sure you want to delete this URL pattern?\nPattern is: "+unescape(curtext)))
240    {
241       link.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern;
242       return true;
243    }
244    return false;
245 }
246
247 function e_p(link,pattern,curtext)
248 {
249    if ((newtext=window.prompt("Edit the pattern to your needs:", unescape(curtext))) != null)
250    {
251       if (newtext != "")
252       { link.href="edit-actions-url?f=@f@&v=@v@&p="+pattern+"&u="+escape(newtext); }
253       else
254       { link.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; }
255       return true;
256    }
257    return false;
258 }
259
260 function a_p(link,section)
261 {
262    if (((newtext=window.prompt("Enter the new pattern:", "")) != null ) && (newtext != ""))
263    {
264       link.href="edit-actions-add-url?f=@f@&v=@v@&s="+section+"&u="+escape(newtext);
265       return true;
266    }
267    return false;
268 }
269 //-->
270 </script>
271 </head>
272
273 <body>
274
275   <table cellpadding="20" cellspacing="10" border="0" width="100%">
276     <tr>
277       <td class="title">
278
279 #include mod-title
280
281       </td>
282     </tr>
283
284 <!-- @if-unstable-start -->
285 # This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in
286     <tr>
287       <td class="warning">
288
289 #include mod-unstable-warning
290
291       </td>
292     </tr>
293 <!-- if-unstable-end@ -->
294
295     <tr>
296       <td class="info">
297         <h2>What is all this?</h2>
298         <p>
299          If you haven't already done so, it is <b>strongly recommended</b> that you at 
300          least skim <a href="@user-manual@@actions-help-prefix@ACTIONS-FILE">the
301          chapter on actions files</a> in the <a href="@user-manual@">User Manual</a>
302          before making any changes. You will also find a comprehensive list of
303          all available actions there, as well how the settings on this page
304          work.
305         </p>
306          <!-- @if-all-urls-present-then@ -->
307         <p>
308          Please note that <b>the first section has special importance</b>. It sets the default actions for
309          all URLs. The resulting actions for a particular URL may differ from these defaults if that
310          URL matches again further down, but this section is largely responsible for your browsing
311          experience. Edit manually with great care, or choose from the predefined sets of actions.
312         </p>
313         <!-- @else-not-all-urls-present@@endif-all-urls-present@ -->
314         <!-- @if-default-action-then@ -->
315         <p>
316          This is the default action file. Updates for it are available from
317          <a href="http://www.privoxy.org/">Privoxy.org</a> from time to time. 
318          It is therefore <b>not recommended</b> that you add your private
319          rules here, since they will be lost if you install an update in the future.
320          Put your rules in a separate actions file, like <tt>user.action</tt> instead.
321         </p>
322         <!-- @else-not-default-action@@endif-default-action@ -->
323       </td>
324     </tr>
325
326     <tr>
327       <td class="box">
328         <div class="buttons">
329           <h2>Editing Actions File @f@.action</h2>
330           <!-- @if-all-urls-present-then@@else-not-all-urls-present@ -->
331           <p><a class="cmd" href="edit-actions-section-add?f=@f@&amp;v=@v@&amp;s=0">Insert new section at top</a></p>
332           <!-- @endif-all-urls-present@ -->
333         </div>
334       </td>
335     </tr>
336
337     <!-- @if-all-urls-present-then@ -->
338     <tr>
339       <td class="container"><a name="l@all-urls-s@"></a>
340         <table border="0" width="100%" cellspacing="2" cellpadding="3" class="framed">
341           <tr class="actions"><td class="header"><a href="@user-manual@@actions-help-prefix@ACTIONS">Actions</a>:</td></tr>
342           <tr class="actions">
343             <td class="indentbuttons">
344               <a href="eafu?f=@f@&amp;v=@v@&amp;s=@all-urls-s@">Edit</a>
345               @all-urls-buttons@
346             </td>
347           </tr>
348           <tr class="actions"><td class="action">@all-urls-actions@</td></tr>
349           <tr class="url"><td class="header"><a href="@user-manual@@actions-help-prefix@AF-PATTERNS">URL patterns</a>:</td></tr>
350           <tr class="url"><td class="indentbuttons">/ &nbsp; <i>(Matches all requests)</a></td></tr>
351           <tr class="adv"><td class="header">Advanced:</td></tr>
352           <tr class="adv">
353             <td class="indentbuttons">
354               <a href="easa?f=@f@&amp;v=@v@&amp;s=@all-urls-s@#l@all-urls-s-next@">Insert new section below</a>
355             </td>
356           </tr>
357         </table>
358       </td>
359     </tr>
360     <!-- @else-not-all-urls-present@@endif-all-urls-present@ -->
361
362 @sections@
363
364     <tr>
365       <td class="box">
366         <h2>More Privoxy:</h2>
367         <ul>@menu@<li><a href="@user-manual@">Documentation</a></li></ul>
368       </td>
369     </tr>
370
371     <tr>
372       <td class="info">
373
374 #include mod-support-and-service
375
376       </td>
377     </tr>
378
379 <!-- @if-have-help-info-start -->
380     <tr>
381       <td class="info">
382
383 #include mod-local-help
384
385       </td>
386     </tr>
387 <!-- if-have-help-info-end@ -->
388
389     <tr>
390       <td>
391         <small><small>Valid <a href="http://validator.w3.org/">HTML 4.01 Strict</a></small></small>
392       </td>
393     </tr>
394
395   </table>
396 </body>
397
398 </html>