diff options
-rw-r--r-- | bugzillaBugTriage.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index aad78ce..06af057 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -563,7 +563,7 @@ BzPage.prototype.collectComments = function () { this.commentsWalker( function (x) { outStr += x.getElementsByTagName("pre")[0].textContent + "\n"; }); - return outStr; + return outStr.trim(); }; /** @@ -1477,11 +1477,11 @@ BzPage.prototype.buildButtons = function (above,below) { "Send upstream","","SENDUPSTREAM","",false); } - var brElement2BMoved = this.dok.querySelector("#comment_status_commit br:last-of-type"); +// var brElement2BMoved = this.dok.querySelector("#comment_status_commit br:last-of-type"); // var brWhereMove = this.dok.getElementsByClassName("status")[0]; // brWhereMove.parentNode.insertBefore(brElement2BMoved.cloneNode(true), // brWhereMove); - brElement2BMoved.parentNode.removeChild(brElement2BMoved); +// brElement2BMoved.parentNode.removeChild(brElement2BMoved); // TODO Get compiz bugs as well if ((chipIDsGroupings.length >0) && @@ -1508,13 +1508,9 @@ function BzPage(doc) { var that = this; this.originalButton = this.dok.getElementById("commit"); - // FIXME more elegant way to do this with querySelector? - // var loginArr = $("#header ul:first li:last", this.doc). - // text().split("\n"); - var loginArrLiElements = this.dok.getElementById("header"). - getElementsByTagName("ul")[0]. - getElementsByTagName("li"); - var loginArr = loginArrLiElements[loginArrLiElements.length-1]. + console.log(this.dok.querySelector("#header ul.links li:last-of-type")); + var loginArr = this.dok. + querySelector("#header ul.links li:last-of-type"). textContent.split("\n"); this.login = loginArr[loginArr.length-1].trim(); this.password = ""; |