Rejuggle all heading levels. We now use H1, which we didn't before.
[mkws-moved-to-github.git] / src / mkws-core.js
index f90c759..04accc8 100644 (file)
@@ -9,7 +9,9 @@
 // Set up global mkws object. Contains truly global state such as SP
 // authentication, and a hash of team objects, indexed by team-name.
 //
-var mkws = {
+// We set it as a property of window to make the global explicit as
+// some things complain about an implicit global.
+window.mkws = {
   $: $, // Our own local copy of the jQuery object
   authenticated: false,
   log_level: 1, // Will be overridden from mkws.config, but
@@ -113,12 +115,12 @@ mkws.log = function(string) {
 // navigation. pz2.js picks this up and uses it as part of the
 // cookie-name, to ensure each tab gets its own session.
 if (window.name) {
-  console.log("Using existing window.name '" + window.name + "'");
+  mkws.log("Using existing window.name '" + window.name + "'");
 } else {
   // Ten chars from 26 alpha-numerics = 36^10 = 3.65e15 combinations.
   // At one per second, it will take 116 million years to duplicate a session
   window.name = Math.random().toString(36).slice(2, 12);
-  console.log("Generated new window.name '" + window.name + "'");
+  mkws.log("Generated new window.name '" + window.name + "'");
 }