aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/lib/rhbzpage.js9
-rw-r--r--data/lib/util.js6
2 files changed, 13 insertions, 2 deletions
diff --git a/data/lib/rhbzpage.js b/data/lib/rhbzpage.js
index 4adb6ea..d8f5727 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
@@ -151,7 +155,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;
}
@@ -244,6 +248,7 @@ function fillInWhiteBoard(PCIidArrObj) {
}
}
+ console.myDebug("fillInWhiteBoard: cardName = " + cardName);
clickMouse("editme_action");
var titleElem = document.getElementById('short_desc');
titleElem.value = '[' + cardName + ']\u00A0' + titleElem.value;
@@ -381,7 +386,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 40a782f..fa111aa 100644
--- a/data/lib/util.js
+++ b/data/lib/util.js
@@ -355,3 +355,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);
+ }
+};