- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 22 May 2006 21:24:55 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/ack
In directory hutz:/tmp/cvs-serv2738
Modified Files:
ack.pl
Log Message:
Don't output table in initial view.
Index: ack.pl
===================================================================
RCS file: /sources/public/2006/ack/ack.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ack.pl 22 May 2006 21:14:00 -0000 1.3
+++ ack.pl 22 May 2006 21:24:53 -0000 1.4
@@ -65,23 +65,30 @@
<input name=\"go\" type=\"submit\" value=\"Check links\" />
<input id=\"pr\" type=\"button\" onclick=\"pauseResume(this)\" value=\"Pause\" disabled=\"disabled\" />
<span id=\"stat\">(0 of 0 checked)</span>
-</form>
+</form>";
-<table width=\"100%\">
+if (scalar(%links)) {
+ print <<EOF;
+<table width="100%">
<thead>
<tr>
-<th width=\"50%\">URL (number of occurrences)</th>
-<th width=\"50%\">Status</th>
+<th width="50%">URL (number of occurrences)</th>
+<th width="50%">Status</th>
</tr>
-</thead>\n";
-foreach (keys(%links)) {
- my $md5 = md5_hex($_);
- my $url = encode_entities($_);
- my $l = length($_);
- my $foo = encode_entities($l > ML ?
- substr($_, 0, ML/2) . "[...]" . substr($_, $l - ML/2) : $_);
- print "<tr><td><a id=\"L$md5\" href=\"$url\" onclick=\"check(this.href,'$md5');return false\">$foo</a>";
- print " ($links{$_})" if ($links{$_} > 1);
- print "</td><td class=\"na\" id=\"S$md5\">uninitialized</td></tr>\n";
+</thead>
+<tbody>
+EOF
+ foreach (keys(%links)) {
+ my $md5 = md5_hex($_);
+ my $url = encode_entities($_);
+ my $l = length($_);
+ my $foo = encode_entities($l > ML ?
+ substr($_, 0, ML/2) . "[...]" . substr($_, $l - ML/2) : $_);
+ print "<tr><td><a id=\"L$md5\" href=\"$url\" onclick=\"check(this.href,'$md5');return false\">$foo</a>";
+ print " ($links{$_})" if ($links{$_} > 1);
+ print "</td><td class=\"na\" id=\"S$md5\">uninitialized</td></tr>\n";
+ }
+ print "</tbody>\n</table>\n";
}
-print "</table></body></html>";
+
+print "</body>\n</html>";
Received on Monday, 22 May 2006 21:25:06 UTC