Move member declarations ahead of code.
[mkws-moved-to-github.git] / tools / htdocs / mkws.js
index 4579c8e..b294302 100644 (file)
@@ -143,15 +143,6 @@ if (mkws_config == null || typeof mkws_config != 'object') {
 
 // wrapper for jQuery lib
 function _make_mkws_team($, teamName) {
-    // if (console && console.log) // disabled, will fail in IE8
-    // console.log("run _make_mkws_team(" + (teamName ? teamName : "") + ")");
-
-    // call this function only once
-    if (mkws.init) {
-       alert("_make_mkws_team() called twice: how did that happen?!");
-       return;
-    }
-
     var m_sort = 'relevance';
     var m_filters = [];
     var curPage = 1;
@@ -164,15 +155,23 @@ function _make_mkws_team($, teamName) {
     var SubjectMax = 10;
     var AuthorMax = 10;
     var m_query; // initially undefined
-
-
-    // keep time state for debugging
     var m_debug_time = {
+       // Timestamps for logging
        "start": $.now(),
        "last": $.now()
     };
 
 
+    // call this function only once
+    if (mkws.init) {
+       alert("_make_mkws_team() called twice: how did that happen?!");
+       return;
+    }
+
+    // if (console && console.log) // disabled, will fail in IE8
+    // console.log("run _make_mkws_team(" + (teamName ? teamName : "") + ")");
+
+
     // Needs to be defined inside _make_mkws_team() so it can see m_debug_time
     mkws.debug_function = function (string) {
        if (!mkws.debug_level)