зеркало из https://github.com/mozilla/pjs.git
Fix 202792 - remove startup JS warnings, patch by holyspirit@hkpeople.net and brantgurganus2001@cherokeescouting.org
This commit is contained in:
Родитель
ba5caa9ef9
Коммит
a0e8a19dfb
|
@ -758,10 +758,7 @@
|
|||
|
||||
// Now select the new tab before nuking the old one.
|
||||
var currentIndex = this.mPanelContainer.selectedIndex;
|
||||
|
||||
// Now select the new tab before nuking the old one.
|
||||
var currentIndex = this.mPanelContainer.selectedIndex;
|
||||
|
||||
|
||||
var newIndex = -1;
|
||||
if (currentIndex > index)
|
||||
newIndex = currentIndex-1;
|
||||
|
|
|
@ -210,21 +210,22 @@
|
|||
var newItem = null;
|
||||
|
||||
// Create special cases of palette items.
|
||||
var uniqueId;
|
||||
if (aId == "separator") {
|
||||
newItem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"toolbarseparator");
|
||||
var uniqueId = (new Date()).getTime()+this.childNodes.length;
|
||||
uniqueId = (new Date()).getTime()+this.childNodes.length;
|
||||
newItem.id = "separator" + uniqueId;
|
||||
} else if (aId == "spring") {
|
||||
newItem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"toolbarspring");
|
||||
var uniqueId = (new Date()).getTime()+this.childNodes.length;
|
||||
uniqueId = (new Date()).getTime()+this.childNodes.length;
|
||||
newItem.flex = 1;
|
||||
newItem.id = "spring" + uniqueId;
|
||||
} else if (aId == "spacer") {
|
||||
newItem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"toolbarspacer");
|
||||
var uniqueId = (new Date()).getTime()+this.childNodes.length;
|
||||
uniqueId = (new Date()).getTime()+this.childNodes.length;
|
||||
newItem.id = "spacer" + uniqueId;
|
||||
} else {
|
||||
// Attempt to locate an item with a matching id within palette.
|
||||
|
@ -240,7 +241,7 @@
|
|||
}
|
||||
|
||||
if (!newItem)
|
||||
return;
|
||||
return false;
|
||||
|
||||
var insertItem = newItem;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче