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 /data/lib/collectingMetadata.js | |
parent | bb5c0968ad8f2dd46a4a398b505a829c584f02e6 (diff) | |
download | bugzilla-triage-06c5c60704fb181cf870c04cb79b2d6275600f06.tar.gz |
Make sending bugs upstream working (collecting comments was broken).
Diffstat (limited to 'data/lib/collectingMetadata.js')
-rw-r--r-- | data/lib/collectingMetadata.js | 11 |
1 files changed, 8 insertions, 3 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; } // ----------------------------------------------------------- |