aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-09-23 14:23:25 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-09-23 14:23:25 +0200
commit38c0e794b2a46545ed2b31d5ddfd27cd533c1d3d (patch)
tree6910103b37026a8ea38bff25719920a32d375ab5
parentc1a5120e976d18072e80a6086ff0a6a8ef83cb88 (diff)
downloadbugzilla-triage-38c0e794b2a46545ed2b31d5ddfd27cd533c1d3d.tar.gz
innerHTML is a good servant ... scrap it, it is bad servant even.
-rw-r--r--lib/rhbzpage.js12
-rw-r--r--package.json2
-rw-r--r--update.rdf18
3 files changed, 23 insertions, 9 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index c3d86ba..9bbc81f 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -311,13 +311,9 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
// TODO we need to go through all backtrace attachments, but
// just the first one will do for now, we would need to do async
// parsing
- console.log("btAttachments = " + btAttachments.toSource());
btAttachments.forEach(function(x) {
var attURL = "https://bugzilla.redhat.com/attachment.cgi?id="
+ x[1];
- console.log("attURL = " + attURL);
- console.log("this.btSnippet = " + this.btSnippet);
- console.log("btparsed = " + this.idContainsWord("status_whiteboard", 'btparsed'));
if ((!this.btSnippet) &&
(!this.idContainsWord("status_whiteboard", 'btparsed'))) {
var that = this;
@@ -388,8 +384,10 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
var newTRElem = origAtt[4].cloneNode(true);
// fix number of the attachment
- newTRElem.innerHTML = newTRElem.innerHTML.replace(origAtt[1], newAttId);
- console.log("newTRElem = " + newTRElem.innerHTML);
+ Array.forEach(newTRElem.getElementsByTagName("a"), function (aEl) {
+ aEl.setAttribute("href",
+ aEl.getAttribute("href").replace(origAtt[1], newAttId));
+ });
var aElements = newTRElem.getElementsByTagName("a");
aElements[0].setAttribute("name","parsed-backtrace.txt");
@@ -402,7 +400,6 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
var vcardSpan = newTRElem.getElementsByClassName("vcard")[0];
if (vcardSpan !== undefined) {
- console.log("vcardSpan = " + vcardSpan);
var vcardSpanClassList = vcardSpan.classList;
if (/@redhat\.com/.test(this.login) && !vcardSpanClassList.contains("redhat_user")) {
vcardSpanClassList.add("redhat_user");
@@ -415,7 +412,6 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
}
var elem = newTRElem.querySelector("td:last-of-type");
- console.log("elem.innerHTML = " + elem.innerHTML);
this.createDeadLink("showBacktrace", "show BT", elem,
this.showAttachment, newAttId, false);
diff --git a/package.json b/package.json
index 3dfffe1..74a8473 100644
--- a/package.json
+++ b/package.json
@@ -7,5 +7,5 @@
"description": "Additional buttons and other function helping in the triage on bugzilla",
"author": "Matej Cepl (http://matej.ceplovi.cz)",
"license": "MIT/X11 (http://opensource.org/licenses/mit-license.php)",
- "version": "0.23"
+ "version": "0.24"
}
diff --git a/update.rdf b/update.rdf
index 7afdf2b..425440a 100644
--- a/update.rdf
+++ b/update.rdf
@@ -162,6 +162,24 @@
</em:targetApplication>
</RDF:Description>
</RDF:li>
+ <RDF:li>
+ <RDF:Description>
+ <em:version>0.24</em:version> <!-- This is the version number of the add-on -->
+ <!-- One targetApplication for each application the add-on is compatible with -->
+ <em:targetApplication>
+ <RDF:Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>3.6</em:minVersion>
+ <em:maxVersion>4.*</em:maxVersion>
+ <!-- This is where this version of the add-on will be downloaded from -->
+ <em:updateLink>https://fedorahosted.org/released/bugzilla-triage-scripts/bugzilla-triage-0.24.xpi</em:updateLink>
+
+ <!-- A page describing what is new in this updated version -->
+ <em:updateInfoURL>https://fedorahosted.org/bugzilla-triage-scripts/wiki/ChangeLog</em:updateInfoURL>
+ </RDF:Description>
+ </em:targetApplication>
+ </RDF:Description>
+ </RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>