diff options
Diffstat (limited to 'data/lib')
-rw-r--r-- | data/lib/rhbzpage.js | 9 | ||||
-rw-r--r-- | data/lib/util.js | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/data/lib/rhbzpage.js b/data/lib/rhbzpage.js index 8831b24..2e6cf3d 100644 --- a/data/lib/rhbzpage.js +++ b/data/lib/rhbzpage.js @@ -1,6 +1,9 @@ // Released under the MIT/X11 license // http://www.opensource.org/licenses/mit-license.php +// Are we debugging? +var debugFlag = true; + // For identification of graphics card var manuChipStrs = [ [ "ATI Radeon", "ATI", "1002" ], [ "ATI Mobility Radeon", "ATI", "1002" ], @@ -131,6 +134,7 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) { markBugTriaged(); break; case "chipMagic": + console.myDebug("cmdParams = " + cmdParams.toSource()); fillInWhiteBoard(cmdParams); break; // If we don't have it here, call superclass method @@ -149,7 +153,7 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) { function markBadAttachments(atts) { var badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ]; if (!constantData.passwordState.passAvailable) { - console.log("markBadAttachments : No password, no XML-RPC calls; sorry"); + console.myDebug("markBadAttachments : No password, no XML-RPC calls; sorry"); return null; } @@ -242,6 +246,7 @@ function fillInWhiteBoard(PCIidArrObj) { } } + console.myDebug("fillInWhiteBoard: cardName = " + cardName); clickMouse("editme_action"); var titleElem = document.getElementById('short_desc'); titleElem.value = '[' + cardName + ']\u00A0' + titleElem.value; @@ -379,7 +384,7 @@ function addClosingUpstream() { centralCommandDispatch("resolution", "UPSTREAM"); } else { - console.log("No external bug specified among the External References!"); + console.myDebug("No external bug specified among the External References!"); } } diff --git a/data/lib/util.js b/data/lib/util.js index 6256171..51f3704 100644 --- a/data/lib/util.js +++ b/data/lib/util.js @@ -351,3 +351,9 @@ var NotLoggedinException = function NotLoggedinException (message) { NotLoggedinException.prototype.toString = function () { return this.name + ': "' + this.message + '"'; }; + +console.myDebug = function myDebug(str) { + if (debugFlag) { + console.log(str); + } +}; |