From: Mike Taylor Date: Tue, 11 Feb 2014 16:31:56 +0000 (+0000) Subject: The third debug() function in mkws.js, inside the jQuery plugin, is X-Git-Tag: 1.0.0~1480 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=788954be61eb460e03e9c409a42a22c7198b84a5;p=mkws-moved-to-github.git The third debug() function in mkws.js, inside the jQuery plugin, is now also reduced to a one-line delegation to mkws.debug(). Nice to be down to a single logging function. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index bd122e2..8fc2d89 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -1116,16 +1116,8 @@ function team($, teamName) { * implement jQuery plugin $.pazpar2({}) */ function _mkws_jquery_plugin ($) { - var debug_level = 1; - function debug (string) { - if (!debug_level) - return; - - if (typeof console === "undefined" || typeof console.log === "undefined") - return; - - console.log("jquery.pazpar2: " + string); + mkws.debug("jquery.pazpar2: " + string); } function init_popup(obj) {