- // 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);
- }
-