W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2010

link-checker commit: Fix some jslint javascript warnings.

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 05 Aug 2010 14:47:22 +0000
To: link-checker updates <www-validator-cvs@w3.org>
Message-Id: <E1Oh1j8-0006IX-S6@blinky.w3.org>
changeset:   320:187f7bdbf052
user:        ville
date:        Wed Aug 05 20:32:15 2009 +0000
files:       bin/checklink
description:
Fix some jslint javascript warnings.


diff -r def35ad5f837 -r 187f7bdbf052 bin/checklink
--- a/bin/checklink	Sat Jul 04 03:45:57 2009 +0000
+++ b/bin/checklink	Wed Aug 05 20:32:15 2009 +0000
@@ -5,7 +5,7 @@
 # (c) 1999-2009 World Wide Web Consortium
 # based on Renaud Bruyeron's checklink.pl
 #
-# $Id: checklink,v 4.162 2009-07-04 03:45:57 mernst Exp $
+# $Id: checklink,v 4.163 2009-08-05 20:32:15 ville Exp $
 #
 # This program is licensed under the W3C(r) Software License:
 #       http://www.w3.org/Consortium/Legal/copyright-software
@@ -275,7 +275,7 @@
   $PROGRAM     = 'W3C-checklink';
   $VERSION     = '4.5';
   $REVISION    = sprintf('version %s (c) 1999-2009 W3C', $VERSION);
-  my ($cvsver) = q$Revision: 4.162 $ =~ /(\d+[\d\.]*\.\d+)/;
+  my ($cvsver) = q$Revision: 4.163 $ =~ /(\d+[\d\.]*\.\d+)/;
   $AGENT       = sprintf('%s/%s [%s] %s',
                          $PROGRAM, $VERSION, $cvsver,
                          (W3C::UserAgent::USE_ROBOT_UA
@@ -343,18 +343,18 @@
 <meta name="generator" content="%s" />
 <link rel="stylesheet" type="text/css" href="%s" />
 <script type="text/javascript">
+function scroll_bottom(progress_pre_id) {
+var progressPre = document.getElementById(progress_pre_id);
+progressPre.scrollTop = progressPre.scrollHeight;
+}
 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");
+var oChild=progressHead.childNodes[1];
+var oNewChild=document.createElement("span");
 oNewChild.appendChild(txt);
 progressHead.replaceChild(oNewChild, oChild);
 scroll_bottom(progress_pre_id);
-};
-function scroll_bottom(progress_pre_id) {
-var progressPre = document.getElementById(progress_pre_id);
-progressPre.scrollTop = progressPre.scrollHeight;
 }</script>
 EOF
 
@@ -2454,12 +2454,14 @@
     var ok = false;
     if (u.value.length > 0) {
       if (u.value.search) {
-        ok = (u.value.search(/\S/) != -1);
+        ok = (u.value.search(/\S/) !== -1);
       } else {
         ok = true;
       }
     }
-    if (! ok) u.focus();
+    if (! ok) {
+      u.focus();
+    }
     return ok;
   }
   return true;
Received on Thursday, 5 August 2010 14:47:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC