- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Jan 2009 18:22:44 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv29962/bin
Modified Files:
checklink
Log Message:
autoscroll of results as they happen, based on prototype by Brett Bieber
Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.131
retrieving revision 4.132
diff -u -d -r4.131 -r4.132
--- checklink 6 Jan 2009 22:19:33 -0000 4.131
+++ checklink 7 Jan 2009 18:22:42 -0000 4.132
@@ -326,14 +326,19 @@
<meta name="generator" content="%s" />
<link rel="stylesheet" type="text/css" href="%s" />
<script type="text/javascript">
-function show_progress(progress_text, progress_head_id) {
+function show_progress(progress_text, progress_head_id, progress_pre_id) {
var progressHead = document.getElementById(progress_head_id);
var txt = document.createTextNode(progress_text);
oChild=progressHead.childNodes[1];
oNewChild=document.createElement("span");
oNewChild.appendChild(txt);
progressHead.replaceChild(oNewChild, oChild);
-};</script>
+scroll_bottom(progress_pre_id);
+};
+function scroll_bottom(progress_pre_id) {
+var progressPre = document.getElementById(progress_pre_id);
+progressPre.scrollTop = progressPre.scrollHeight;
+}</script>
EOF
# Trusted environment variables that need laundering in taint mode.
@@ -919,7 +924,7 @@
&encode($Opts{_Self_URI}));
printf ('<h3 class="status_progress" id="status_progress%s">Status: <span></span></h3>', $result_anchor);
- print("<pre class=\"progress\">\n");
+ printf("<pre class=\"progress\" id=\"pre_progress%s\">\n", , $result_anchor);
}
}
@@ -1007,9 +1012,9 @@
# Hack: avoid browser/server timeouts in summary only CGI mode, bug 896
print ' ' if ($Opts{HTML} && !$Opts{Command_Line});
} else {
- printf('<script type="text/javascript">show_progress("Checking link %s", "status_progress%s");</script>' , &encode($u), $result_anchor)
+ &hprintf("\nChecking link %s\n", $u);
+ printf('<script type="text/javascript">show_progress("Checking link %s", "status_progress%s", "pre_progress%s");</script>' , &encode($u), $result_anchor, $result_anchor)
if (!$Opts{Command_Line} && $Opts{HTML} && !$Opts{Summary_Only});
- &hprintf("Checking link %s\n", $u);
}
# Check that a link is valid
@@ -1049,10 +1054,10 @@
}
}
}
- printf('<script type="text/javascript">show_progress("Done. Document processed in %ss.\n", "status_progress%s");</script>' , &time_diff($start, &get_timestamp()), $result_anchor)
- if ($Opts{HTML} && !$Opts{Summary_Only});
- &hprintf("Processed in %ss.\n", &time_diff($start, &get_timestamp()))
+ &hprintf("\nProcessed in %ss.\n", &time_diff($start, &get_timestamp()))
unless $Opts{Summary_Only};
+ printf('<script type="text/javascript">show_progress("Done. Document processed in %ss.\n", "status_progress%s", "pre_progress%s");</script>' , &time_diff($start, &get_timestamp()), $result_anchor, $result_anchor)
+ if ($Opts{HTML} && !$Opts{Summary_Only});
# Display results
if ($Opts{HTML} && !$Opts{Summary_Only}) {
Received on Wednesday, 7 January 2009 18:22:52 UTC