From e9461083b1abcc1bbc9f710c18bdf56fdedb1a83 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 4 Apr 2011 00:01:53 +0200 Subject: Move marking reporter's to otherButtons module. --- data/lib/otherButtons.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'data/lib/otherButtons.js') diff --git a/data/lib/otherButtons.js b/data/lib/otherButtons.js index bc445bf..3a1f76a 100644 --- a/data/lib/otherButtons.js +++ b/data/lib/otherButtons.js @@ -2,6 +2,29 @@ // http://www.opensource.org/licenses/mit-license.php "use strict"; +/** + * Set background color of all comments made by reporter in ReporterColor color + * + */ +function checkComments () { + var reporter = getReporter(); + commentsWalker(function(x) { + var email = parseMailto(x.getElementsByClassName("vcard")[0] + .getElementsByTagName("a")[0]); + if (email.indexOf(reporter) != -1) { + x.style.backgroundColor = ReporterColor.toString(); + } + }); +} + +function collectComments () { + var outStr = ""; + commentsWalker(function(x) { + outStr += x.getElementsByTagName("pre")[0].textContent + "\n"; + }); + return outStr.trim(); +} + /** * Find default assignee based on the current component * -- cgit