aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/js/bug-page-mod.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/data/js/bug-page-mod.js b/data/js/bug-page-mod.js
index a75e776..561dda8 100644
--- a/data/js/bug-page-mod.js
+++ b/data/js/bug-page-mod.js
@@ -703,7 +703,9 @@ AttachmentFlagHandlerCtor.prototype = {
if (!(id in this._interestingFlags))
continue;
for (var j = 0; j < this._interestingFlags[id].length; ++j) {
- if (flag.equals(this._interestingFlags[id][j])) {
+ // Take care to not assign an anchor to a flag which already has one
+ if (flag.equals(this._interestingFlags[id][j]) &&
+ !("anchor" in this._interestingFlags[id][j])) {
// found an interesting flag
this._interestingFlags[id][j].anchor = this.anchorName;
anchorsCreated.push(this.anchorName);
@@ -1170,7 +1172,7 @@ function tbplbotSpamCollapser(d) {
a.href = "#";
a.addEventListener("click", function(e) {
e.preventDefault();
- var win = d.defaultView.wrappedJSObject;
+ var win = d.defaultView;
var comments = d.querySelectorAll(".bz_comment");
for (var i = 0; i < comments.length; ++i) {
var comment = comments[i];