Bug 234717, 234116, Context menu commands don't work in *subfolders* of bookmarks menu. Remove the last two children instead of using getElementsByAttributes. The latter is no more needed, since now, insertion of bookmarks with DND occurs at the correct location. YAW--.

This commit is contained in:
chanial%noos.fr 2004-03-20 08:13:39 +00:00
Родитель 9e7b68743e
Коммит 7ada155800
1 изменённых файлов: 5 добавлений и 11 удалений

Просмотреть файл

@ -83,17 +83,11 @@ var BookmarksMenu = {
// hides the 'Open in Tabs' on popuphidden so that we won't duplicate it -->
hideOpenInTabsMenuItem: function (aTarget)
{
# sometimes insertions occur between the "open in tabs" menuitem and
# menuseparator. the eventual children of the menupopup have should
# have already been closed at this stage, so it''s ok to grab the first
# "open in tabs" menuitem and menuseparator.
var nodeList;
nodeList = aTarget.getElementsByAttribute("class", "openintabs-menuitem");
if (nodeList.length > 0)
aTarget.removeChild(nodeList[0]);
nodeList = aTarget.getElementsByAttribute("class", "openintabs-menuseparator");
if (nodeList.length > 0)
aTarget.removeChild(nodeList[0]);
if (aTarget.hasChildNodes() &&
aTarget.lastChild.getAttribute("class") == "openintabs-menuitem") {
aTarget.removeChild(aTarget.lastChild);
aTarget.removeChild(aTarget.lastChild);
}
},
#endif