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