X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=tools%2Fhtdocs%2Fmkws.js;h=57d560660b525d0b22c627d51d1e1db6ce7b6079;hb=f869d536eca69f90dad06f4cbc1ce6d59ecd0887;hp=df0010244799781dac530f4852fdd3aba4e62ed6;hpb=2b55e6d855f08eca88e5ea5a3a0975e125f21128;p=mkws-moved-to-github.git diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index df00102..57d5606 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -171,29 +171,6 @@ function team($, teamName) { var m_paz; // will be initialised below - // if (console && console.log) // disabled, will fail in IE8 - // console.log("run team(" + (teamName ? teamName : "") + ")"); - - - // Needs to be defined inside team() so it can see m_debug_time - // ### member access won't work: there is only one instance of this function - mkws.debug_function = function (string) { - if (!mkws.debug_level) - return; - - if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */ - return; - } - - // you need to disable use strict at the top of the file!!! - if (mkws.debug_level >= 3) { - console.log(arguments.callee.caller); - } else if (mkws.debug_level >= 2) { - console.log(">>> called from function " + arguments.callee.caller.name + ' <<<'); - } - console.log(string); - } - var debug = function (s) { var now = $.now(); var timestamp = ((now - m_debug_time.start)/1000).toFixed(3) + " (+" + ((now - m_debug_time.last)/1000).toFixed(3) + ") " @@ -1280,6 +1257,24 @@ function _mkws_jquery_plugin ($) { // wrapper to call team() after page load (function (j) { + mkws.debug_function = function (string) { + if (!mkws.debug_level) + return; + + if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */ + return; + } + + // you need to disable use strict at the top of the file!!! + if (mkws.debug_level >= 3) { + console.log(arguments.callee.caller); + } else if (mkws.debug_level >= 2) { + console.log(">>> called from function " + arguments.callee.caller.name + ' <<<'); + } + console.log(string); + } + + function log(s) { if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */ return;