aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/bzpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/lib/bzpage.js')
-rw-r--r--data/lib/bzpage.js41
1 files changed, 10 insertions, 31 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js
index 1be287d..c292acd 100644
--- a/data/lib/bzpage.js
+++ b/data/lib/bzpage.js
@@ -329,45 +329,26 @@ function setConfigurationButton () {
}
/**
- * dd
- *
- * @return Element with the href attribute containng the information
- */
-function getOptionTableCell(tableId, label) {
- var cleanLabelRE = new RegExp("^\\s*([^.:]*):?\\s*$");
- label = label.trim().replace(cleanLabelRE,"$1").toLowerCase();
-
- var rows = document.getElementById(tableId).getElementsByTagName("tr");
- var ourLine = Array.filter(rows, function(row) {
- var curLabel = row.getElementsByTagName("td")[0].textContent.toLowerCase();
- curLabel = curLabel.replace(cleanLabelRE,"$1");
- return (curLabel === label); // maybe this could be a RE match instead
- });
-
- if (ourLine.length > 0) {
- return ourLine[0].getElementsByTagName("td")[1].
- getElementsByTagName("a")[0];
- }
- return null;
-}
-
-
-/**
* Complete startup, mainly run alternate inits for non-standard BZ with proper
* arguments
*
*/
function completeInit() {
- var attachments = getAttachments();
+ // FIXME: add flags, and priority or others bits.
+ var things = {
+ attachments: new AttachList(document),
+ comments: new CommentList(document)
+ };
+
if (RHBZinit) {
- RHBZinit(attachments);
+ RHBZinit(things);
}
- console.log("completeInit: tweakBugzilla = " + typeof tweakBugzilla);
- console.log("completeInit: config = " + config.toSource());
+ things.comments.colorComments();
+
if (tweakBugzilla && config.verboseInlineHistory) {
- tweakBugzilla(attachments, constantData);
+ tweakBugzilla(things, constantData);
}
}
@@ -410,8 +391,6 @@ function startup() {
setConfigurationButton();
submitHandlerInstalled = false;
- checkComments();
-
self.postMessage(new Message("GetInstalledPackages", {
location: window.location.href,
login: getLogin()