source@mandoc.bsd.lv
 help / color / Atom feed
* cvsweb: kill all traces of JavaScript; it's disgusting that they crept 
@ 2019-11-11 13:29 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-11-11 13:29 UTC (permalink / raw)
  To: source

Log Message:
-----------
kill all traces of JavaScript;
it's disgusting that they crept in here in the first place

Modified Files:
--------------
    cvsweb:
        README
        cvsweb.cgi
        cvsweb.conf

Revision Data
-------------
Index: cvsweb.conf
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/cvsweb.conf,v
retrieving revision 4.5
retrieving revision 4.6
diff -Lcvsweb.conf -Lcvsweb.conf -u -p -r4.5 -r4.6
--- cvsweb.conf
+++ cvsweb.conf
@@ -409,10 +409,6 @@ $allow_source_extra = 1;
 #
 #$allow_compress = 1;
 
-# Use JavaScript in the UI?
-#
-$use_java_script = 1;
-
 # Show a form for setting options in the directory view?
 #
 $edit_option_form = 1;
Index: README
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/README,v
retrieving revision 4.3
retrieving revision 4.4
diff -LREADME -LREADME -u -p -r4.3 -r4.4
--- README
+++ README
@@ -162,8 +162,6 @@ cvsweb.cgi became quite huge now and is 
 perl-programmer - this is what I do in my spare time!) so this 
 should be rewritten. 
 
-I'd propose a Java-servlet which could use the C/S-protocol .. anyone ?
-
 And what about using mod_perl, and rewriting it into a set of proper Perl-5
 modules?
 
Index: cvsweb.cgi
===================================================================
RCS file: /home/cvs/mandoc/cvsweb/cvsweb.cgi,v
retrieving revision 4.16
retrieving revision 4.17
diff -Lcvsweb.cgi -Lcvsweb.cgi -u -p -r4.16 -r4.17
--- cvsweb.cgi
+++ cvsweb.cgi
@@ -75,7 +75,7 @@ use vars qw (
   $tablepadding $hr_breakable $showfunc $hr_ignwhite $hr_ignkeysubst
   $inputTextSize $mime_types $allow_annotate $allow_markup $allow_mailtos
   $allow_log_extra $allow_dir_extra $allow_source_extra
-  $allow_cvsgraph $cvsgraph_config $use_java_script $edit_option_form
+  $allow_cvsgraph $cvsgraph_config $edit_option_form
   $show_subdir_lastmod $show_log_in_markup $preformat_in_markup
   $tabstop $state $annTable $sel @ForbiddenFiles
   $use_descriptions %descriptions @mytz $dwhere
@@ -120,7 +120,6 @@ BEGIN
   $HTML_META = <<EOM;
 <meta name="robots" content="nofollow" />
 <meta name="generator" content="CVSweb $VERSION" />
-<meta http-equiv="Content-Script-Type" content="text/javascript" />
 <meta http-equiv="Content-Style-Type" content="text/css" />
 EOM
 
@@ -136,10 +135,10 @@ EOM
 
 # -----------------------------------------------------------------------------
 
-sub printDiffSelect($);
+sub printDiffSelect();
 sub printDiffSelectStickyVars();
 sub getDiffLinks($$$);
-sub printLogSortSelect($);
+sub printLogSortSelect();
 sub findLastModifiedSubdirs(@);
 sub htmlify_sub(&$);
 sub htmlify($;$);
@@ -212,7 +211,7 @@ $cvstreedefault = $logo = $defaulttitle 
   $address = $long_intro = $short_instruction = $shortLogLen = $show_author =
   $tablepadding = $hr_breakable = $showfunc = $hr_ignwhite =
   $hr_ignkeysubst = $inputTextSize = $mime_types = $allow_annotate =
-  $allow_markup = $allow_compress = $use_java_script = $edit_option_form =
+  $allow_markup = $allow_compress = $edit_option_form =
   $show_subdir_lastmod = $show_log_in_markup = $preformat_in_markup =
   $tabstop = $use_moddate = $gzip_open = $DEBUG = $allow_cvsgraph =
   $cvsgraph_config = $cvshistory_url = $allow_tar = undef;
@@ -1127,10 +1126,10 @@ EOF
                 || $input{$var} ne $DEFAULTVALUE{$var})
             && $var ne 'only_with_tag');
     }
-    printf(<<EOF, ($use_java_script ? ' onchange="this.form.submit()"' : ''));
+    print <<EOF;
 <span class="nowrap">
 <label for="only_with_tag" accesskey="T">Show only files with tag:
-<select id="only_with_tag" name="only_with_tag"%s>
+<select id="only_with_tag" name="only_with_tag">
 <option value="">All tags / default branch</option>
 EOF
     foreach my $tag (reverse sort { lc $a cmp lc $b } keys %tags) {
@@ -1228,7 +1227,7 @@ EOF
 </td>
 <td class="opt-value">
 EOF
-    printLogSortSelect(0);
+    printLogSortSelect();
     print <<EOF;
 </td>
 <td class="opt-label">
@@ -1247,7 +1246,7 @@ EOF
 </td>
 <td>
 EOF
-    printDiffSelect(0);
+    printDiffSelect();
     print <<EOF;
 </td>
 <td colspan="2" class="opt-label">
@@ -1371,12 +1370,9 @@ gzipclose();
 ## End MAIN
 
 
-sub printDiffSelect($)
+sub printDiffSelect()
 {
-  my ($use_java_script) = @_;
-
   print '<select id="f" name="f"';
-  print ' onchange="this.form.submit()"' if $use_java_script;
   print ">\n";
 
   for my $difftype (@DIFFTYPES) {
@@ -1400,12 +1396,9 @@ sub printDiffSelectStickyVars()
 }
 
 
-sub printLogSortSelect($)
+sub printLogSortSelect()
 {
-  my ($use_java_script) = @_;
-
   print '<select id="logsort" name="logsort"';
-  print ' onchange="this.form.submit()"' if $use_java_script;
   print ">\n";
 
   for my $sortkey (@LOGSORTKEYS) {
@@ -2346,7 +2339,7 @@ EOF
 EOF
     printDiffSelectStickyVars();
     print 'Diff format: ';
-    printDiffSelect($use_java_script);
+    printDiffSelect();
     print "<input type=\"submit\" value=\"Show\" />\n</form>\n";
     html_footer();
     gzipclose();
@@ -3264,7 +3257,7 @@ EOF
 </td>
 <td class="opt-value">
 EOF
-  printDiffSelect($use_java_script);
+  printDiffSelect();
   print <<EOF;
 </td>
 <td></td>
@@ -3273,14 +3266,14 @@ EOF
 
   if (@branchnames) {
 
-    printf(<<EOF, $use_java_script ? ' onchange="this.form.submit()"' : '');
+    print <<EOF;
 <tr>
 <td class="opt-label">
 <label for="only_with_tag" accesskey="B">View only branch:</label>
 </td>
 <td class="opt-value">
 <a name="branch">
-<select id="only_with_tag" name="only_with_tag"%s>
+<select id="only_with_tag" name="only_with_tag">
 EOF
 
     my @tmp = ();
@@ -3313,7 +3306,7 @@ EOF
 </td>
 <td>
 EOF
-  printLogSortSelect($use_java_script);
+  printLogSortSelect();
   print <<EOF;
 </td>
 <td><input type="submit" value="Set" accesskey="S" /></td>
@@ -3539,7 +3532,7 @@ EOF
 <label for="f">Diff format:<br />
 EOF
   printDiffSelectStickyVars();
-  printDiffSelect($use_java_script);
+  printDiffSelect();
   printf(<<EOF, $rev1, $rev2);
 </label>
 <input type="submit" value="Show" />
@@ -3749,9 +3742,9 @@ sub chooseCVSRoot()
         if ($input{$k} && $k ne 'cvsroot');
     }
 
-    printf(<<EOF, $use_java_script ? ' onchange="this.form.submit()"' : '');
+    print <<EOF;
 <label for="cvsroot" accesskey="C">CVS Root:
-<select id="cvsroot" name="cvsroot"%s>
+<select id="cvsroot" name="cvsroot">
 EOF
 
     foreach my $k (@CVSROOT) {
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 13:29 cvsweb: kill all traces of JavaScript; it's disgusting that they crept schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-source

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git