"Fossies" - the Fresh Open Source Software Archive

Member "privoxy_3.0.33/templates/blocked" (8 Dec 2021, 9361 Bytes) of package /windows/www/privoxy_3.0.33.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "blocked": 3.0.29_vs_3.0.30.

    1 ##########################################################
    2 #
    3 # "Blocked" Error Output template for Privoxy.
    4 #
    5 #  NOTE: UNLIKE THE OTHER TEMPLATES, THIS ONE USES
    6 #  JavaScript write() TO GENERATE THE PAGE IN JS_AWARE
    7 #  BROWSERS. SYMBOL SUBSTITUTIONS THAT RESULT IN MULTILINE
    8 #  STRINGS WILL BREAK THE JavaScript SYNTAX.
    9 #  USE WITH CAUTION.
   10 #
   11 # USING HTML TEMPLATES:
   12 # ---------------------
   13 #
   14 # Template files are written in plain HTML, with a few
   15 # additions:
   16 #
   17 # - Lines that start with a '#' character like this one
   18 #   are ignored
   19 #
   20 # - Each item in the below list of exported symbols will
   21 #   be replaced by dynamically generated text, if they
   22 #   are enclosed in '@'-characters. E.g. The string @version@
   23 #   will be replaced by the version number of Privoxy.
   24 #
   25 # - One special application of this is to make whole blocks
   26 #   of the HTML template disappear if the condition <name>
   27 #   is not given. Simply enclose the block between the two
   28 #   strings @if-<name>start and if-<name>-end@. The strings
   29 #   should be placed in HTML comments (<!-- -->), so the
   30 #   html structure won't be messed when the magic happens.
   31 #
   32 # USABLE SYMBOLS IN THIS TEMPLATE:
   33 # --------------------------------
   34 #
   35 #  my-ip-addr:
   36 #    The IP-address that the client used to reach this proxy
   37 #  my-hostname:
   38 #    The hostname associated with my-ip-addr
   39 #  admin-address:
   40 #    The email address of the proxy administrator, as configured
   41 #    in the config file
   42 #  default-cgi:
   43 #    The URL for the "main menu" builtin CGI of this proxy
   44 #  menu:
   45 #    List of <li> elements linking to the other available CGIs
   46 #  version:
   47 #    The version number of the proxy software
   48 #  code-status:
   49 #    The development status of the proxy software: "alpha", "beta",
   50 #    or "stable".
   51 #  homepage:
   52 #    The URL of the Privoxy project, which maintains this software.
   53 #
   54 #  protocol:
   55 #    The request's protocol: http:// or https://
   56 #  hostport:
   57 #    The host and port part of the blocked request's URL.
   58 #  path:
   59 #    The path part of the blocked request's URL.
   60 #  path-ue:
   61 #    The path part of the blocked request's URL, url-encoded.
   62 #
   63 #
   64 # CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS:
   65 # ------------------------------------------------------------------
   66 #
   67 #  unstable:
   68 #    This is an alpha or beta release of the proxy software
   69 #  have-adminaddr-info:
   70 #    An e-mail address for the local Privoxy administrator has
   71 #    been specified and is available through the "admin-address"
   72 #    symbol
   73 #  have-proxy-info:
   74 #    A URL for online documentation about this proxy has been
   75 #    specified and is available through the "proxy-info-url"
   76 #    symbol
   77 #  have-help-info:
   78 #    If either have-proxy-info is true or have-adminaddr-info is
   79 #    true, have-help-info is true.  Used to conditionally include
   80 #    a grey box for any and all help info.
   81 #  force-support:
   82 #    Privoxy has been compiled with support for forced loading
   83 #    of blocked content. In that case, the symbol "force-prefix" is
   84 #    avaiable, which translates to the FORCE_PREFIX
   85 #
   86 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
   87 <html>
   88  <head>
   89   <title>Request blocked (Privoxy@@my-hostname@)</title>
   90   <meta http-equiv="Content-Style-Type" content="text/css">
   91   <meta http-equiv="Content-Script-Type" content="text/javascript">
   92   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   93   <meta name="robots" content="noindex,nofollow">
   94   <link rel="shortcut icon" href="@default-cgi@error-favicon.ico" type="image/x-icon">
   95   <style type="text/css">
   96 #include cgi-style.css
   97   </style>
   98   <script type="text/javascript" language="javascript">
   99   <!--
  100     /*
  101      * Is this window or frame too small
  102      * for the full-blown "blocked" page?
  103      */
  104     function isSmallFrame()
  105     {
  106        minWidth  = 650;
  107        minHeight = 330;
  108 
  109        /*
  110         * Navigator, Mozilla, Opera
  111         */
  112        if (window.innerWidth
  113            && (window.innerWidth >= minWidth)
  114            && (window.innerHeight >= minHeight))
  115        {
  116           return false;
  117        }
  118 
  119        /*
  120         * MSIE
  121         */
  122        else if (document.body && document.body.clientWidth
  123                 && (document.body.clientWidth >= minWidth)
  124                 && (document.body.clientHeight >= minHeight))
  125        {
  126           return false;
  127        }
  128 
  129        /*
  130         * Small window or unsupported browser
  131         */
  132        return true;
  133    }
  134   //-->
  135   </script>
  136  </head>
  137  <body>
  138   <script type="text/javascript" language="javascript">
  139   <!--
  140 #   Note: The same small version is used at the bottom
  141 #         of this file in the <noscript> context. If you
  142 #         make changes here, keep the other version in sync!
  143 
  144   if (isSmallFrame())
  145   {
  146      document.write('\
  147    <p class="small" align="center"> \
  148     Request blocked by <a href="@default-cgi@" target="_blank">Privoxy</a>: @block-reason@ \
  149     <br>See <a href="@default-cgi@show-url-info?url=@hostport@@path-ue@" \
  150      >why this block applies</a> \
  151     <!-- @if-force-support-start --> \
  152     or <a href="http://@hostport@@force-prefix@@path@">go \
  153     <!-- if-force-support-end@ --> \
  154     to <b>@protocol@@hostport@@path@</b> \
  155     <!-- @if-force-support-start --> \
  156     anyway</a>. \
  157     <!-- if-force-support-end@ --> \
  158    </p> \
  159    ');
  160 
  161   }
  162   else
  163   {
  164      document.write('\
  165   <table cellpadding="20" cellspacing="10" border="0" width="100%">\
  166     <tr> \
  167       <td class="status"> \
  168         BLOCKED \
  169       </td> \
  170       <td class="title" width=100%> \
  171          <h1> \
  172           This is <a href="@homepage@">Privoxy</a> @version@ on @my-hostname@ (@my-ip-address@), port @my-port@, \
  173           @if-enabled-display-then@enabled@else-not-enabled-display@disabled@endif-enabled-display@ \
  174         </h1> \
  175       </td> \
  176     </tr> \
  177  \
  178 <!-- @if-unstable-start --> \
  179 # This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in \
  180     <tr> \
  181       <td class="warning" colspan="2"> \
  182         <h2>Warning:</h2> \
  183         <p> \
  184           <b>Please note that this <font color=red>@code-status@</font> release \
  185           of the proxy software is not intended for production systems! \
  186           <br>Use at your own risk. See the <a href="@user-manual@copyright.html">license</a> for details.</b> \
  187         </p> \
  188       </td> \
  189     </tr> \
  190 <!-- if-unstable-end@ --> \
  191  \
  192     <tr> \
  193       <td class="box" colspan="2"> \
  194         <h2>Request for blocked URL</h2> \
  195         <p>Your request for <b>@protocol@@hostport@@path@</b> was blocked. \
  196          <br>Block reason: @block-reason@ \
  197          <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@" \
  198           >See why this block applies</a> \
  199 <!-- @if-force-support-start --> \
  200           or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
  201 <!-- if-force-support-end@ --> \
  202         </p> \
  203       </td> \
  204     </tr> \
  205  \
  206     <tr> \
  207       <td class="box" colspan="2"> \
  208         <h2>More Privoxy:</h2> \
  209         <ul>@menu@<li><a href="@user-manual@">Documentation</a></li></ul> \
  210       </td> \
  211     </tr> \
  212  \
  213 <!-- @if-have-help-info-start --> \
  214     <tr> \
  215       <td class="info" colspan="2"> \
  216         <h2>Local Privoxy support:</h2> \
  217  \
  218 <!-- @if-have-proxy-info-start --> \
  219         <p>You can consult the <a href="@proxy-info-url@">online documentation</a> for more information about this Privoxy installation.</p> \
  220 <!-- if-have-proxy-info-end@ --> \
  221  \
  222 <!-- @if-have-adminaddr-info-start --> \
  223         <p>Address e-mail questions about this service to \
  224           <a href="mailto:@admin-address@"><code>@admin-address@</code></a>, \
  225           who will be glad to help you. \
  226         </p> \
  227 <!-- if-have-adminaddr-info-end@ --> \
  228       </td> \
  229     </tr> \
  230 <!-- if-have-help-info-end@ --> \
  231  \
  232     <tr> \
  233       <td class="info" colspan="2"> \
  234         <big><b>Support and Service:</b></big> \
  235         <p> \
  236           The Privoxy Team values your feedback. \
  237         </p> \
  238         <p> \
  239           Please have a look at the User Manual to learn how to \
  240           <a title="Privoxy User Manual: Contacting the developers, Bug Reporting and Feature Requests" \
  241            href="@user-manual@contact.html">get support or report problems</a>. \
  242         <p> \
  243           If you want to support the Privoxy Team, you can \
  244           <a href="https://www.privoxy.org/participate">participate</a> \
  245           or <a href="https://www.privoxy.org/donate">donate</a>. \
  246         </p> \
  247       </td> \
  248     </tr> \
  249  \
  250   </table> \
  251      ');
  252   }
  253   //-->
  254   </script>
  255 
  256 #   Note: The same small version is used above via JavaScript
  257 #         If you make changes here, keep the other version in sync!
  258 
  259   <noscript>
  260    <p class="small" align="center">
  261     Request blocked by <a href="@default-cgi@">Privoxy</a>: @block-reason@
  262     <br>See <a href="@default-cgi@show-url-info?url=@hostport@@path-ue@"
  263      >why this block applies</a>
  264     <!-- @if-force-support-start -->
  265     or <a href="http://@hostport@@force-prefix@@path@">go
  266     <!-- if-force-support-end@ -->
  267     to <b>@protocol@@hostport@@path@</b>
  268     <!-- @if-force-support-start -->
  269     anyway</a>.
  270     <!-- if-force-support-end@ -->
  271    </p>
  272   </noscript>
  273 
  274  </body>
  275 </html>