Bug 102896 alternates with duplicate URIs ignored on the link toolbar
patch by choess@stwing.upenn.edu r=timeless sr=jag
This commit is contained in:
Родитель
c18fdd56c0
Коммит
30e8ea93fb
|
@ -125,13 +125,10 @@ LinkToolbarButton.prototype = new LinkToolbarItem;
|
|||
function LinkToolbarMenu (linkType) {
|
||||
this.constructor(linkType);
|
||||
|
||||
this.knownLinks = null;
|
||||
|
||||
this.clear = function() {
|
||||
this.disableParentMenuButton();
|
||||
this.getXULElement().setAttribute("disabled", "true");
|
||||
clearPopup(this.getPopup());
|
||||
this.knownLinks = null;
|
||||
}
|
||||
|
||||
function clearPopup(popup) {
|
||||
|
@ -144,25 +141,12 @@ function LinkToolbarMenu (linkType) {
|
|||
}
|
||||
|
||||
this.displayLink = function(linkElement) {
|
||||
if (this.isAlreadyAdded(linkElement)) return false;
|
||||
|
||||
this.getKnownLinks()[linkElement.href] = true;
|
||||
this.addMenuItem(linkElement);
|
||||
this.getXULElement().removeAttribute("disabled");
|
||||
this.enableParentMenuButton();
|
||||
return true;
|
||||
}
|
||||
|
||||
this.isAlreadyAdded = function(linkElement) {
|
||||
return this.getKnownLinks()[linkElement.href];
|
||||
}
|
||||
|
||||
this.getKnownLinks = function() {
|
||||
if (!this.knownLinks)
|
||||
this.knownLinks = new Array();
|
||||
return this.knownLinks;
|
||||
}
|
||||
|
||||
function match(first, second) {
|
||||
if (!first && !second) return true;
|
||||
if (!first || !second) return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче