diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-06-06 15:28:49 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-06 15:31:35 +0200 |
commit | 06c5c60704fb181cf870c04cb79b2d6275600f06 (patch) | |
tree | e83f4550c2fff61e1b5defa6883cea52974f26c8 | |
parent | bb5c0968ad8f2dd46a4a398b505a829c584f02e6 (diff) | |
download | bugzilla-triage-06c5c60704fb181cf870c04cb79b2d6275600f06.tar.gz |
Make sending bugs upstream working (collecting comments was broken).
-rw-r--r-- | data/lib/collectingMetadata.js | 11 | ||||
-rw-r--r-- | lib/main.js | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/data/lib/collectingMetadata.js b/data/lib/collectingMetadata.js index f1fa488..a38f0fc 100644 --- a/data/lib/collectingMetadata.js +++ b/data/lib/collectingMetadata.js @@ -12,6 +12,9 @@ function Comment(comment) { this.timeSpan = timeSpan; } +Comment.prototype.getText = function getText() { + return this.element.getElementsByTagName("pre")[0].textContent.trim(); +} function CommentList(doc) { var commentElems = document.getElementById("comments"). @@ -42,9 +45,11 @@ CommentList.prototype.colorComments = function colorComments() { } CommentList.prototype.getAllCommentsText = function getAllCommentsText() { - return this.comments.reduce(function (outStr, com) { - outStr += com.getElementsByTagName("pre")[0].textContent + "\n"; - }).trim(); + var outStr = ""; + for (var idx in this.comments) { + outStr += this.comments[idx].getText() + "\n"; + } + return outStr; } // ----------------------------------------------------------- diff --git a/lib/main.js b/lib/main.js index 909de44..a48f515 100644 --- a/lib/main.js +++ b/lib/main.js @@ -214,4 +214,3 @@ contextMenu.Item({ require("clipboard").set(comment); } }); -tabs.open("https://bugzilla.redhat.com/show_bug.cgi?id=692250"); |