Mir ist das ehrlich gesagt zu unübersichtlich. Es wimmelt von Symbolen und dann auch noch immer die gleichen. Ich verwende ein anderes Skript, das mir in einer gesonderten Zeile oben im Untermenü die Anzahl der Ordner, die Anzahl der Links (Lesezeichen) und die Möglichkeit angibt, die Links in Tabs zu öffnen.
JavaScript
(function() {
if (!window.gBrowser)
return;
function setFunction() {
PlacesViewBase.prototype._mayAddCommandsItems =
function PVB__mayAddCommandsItems(aPopup) {
let hasMultipleURIs = false;
let menuitemCount = 0;
let menuCount = 0;
if (aPopup._placesNode.childCount > 0) {
for (let item of aPopup.children) {
if (item._placesNode) {
if (item.localName == 'menuitem') {
menuitemCount++;
} else if (item.localName == 'menu') {
menuCount++;
}
}
}
if (menuitemCount > 0 || menuCount > 0) {
hasMultipleURIs = true;
}
}
if (!hasMultipleURIs) {
aPopup.setAttribute("nofooterpopup", "true");
if (aPopup._endOptOpenAllInTabs) {
aPopup.removeChild(aPopup._endOptOpenAllInTabs);
aPopup._endOptOpenAllInTabs = null;
aPopup.removeChild(aPopup._endOptSeparator);
aPopup._endOptSeparator = null;
}
return;
}
aPopup.removeAttribute("nofooterpopup");
if (!aPopup._endOptOpenAllInTabs) {
aPopup._endOptSeparator = document.createXULElement("menuseparator");
aPopup._endOptSeparator.className = "bookmarks-actions-menuseparator";
aPopup.insertBefore(aPopup._endOptSeparator, aPopup.firstChild);
aPopup._endOptOpenAllInTabs = document.createXULElement("menuitem");
aPopup._endOptOpenAllInTabs.className = "openintabs-menuitem";
if (this.options?.extraClasses?.entry) {
aPopup._endOptOpenAllInTabs.classList.add(
this.options.extraClasses.entry
);
}
aPopup._endOptOpenAllInTabs.setAttribute(
"oncommand",
"PlacesUIUtils.openMultipleLinksInTabs(this.parentNode._placesNode, event, " +
"PlacesUIUtils.getViewForNode(this));"
);
aPopup._endOptOpenAllInTabs.setAttribute(
"onclick",
"checkForMiddleClick(this, event); event.stopPropagation();"
);
aPopup.insertBefore(aPopup._endOptOpenAllInTabs, aPopup.firstChild);
}
let label = menuCount;
if (menuCount == 1) {
label += " Ordner";
}
else if (menuCount == 2) {
label += " Ordner";
}
else if (menuCount == 3 || menuCount == 4) {
label += " Ordner";
}
else if (menuCount == 0 || menuCount > 4 || menuCount <= 100) {
label += " Ordner";
}
label += " / " + menuitemCount
if (menuitemCount == 1) {
label += " Link. -> Link in Tab öffnen."
} else if (menuitemCount == 2) {
label += " Links. -> Links in Tabs öffnen."
} else if (menuitemCount == 3 || menuitemCount == 4) {
label += " Links. -> Links in Tabs öffnen."
} else if (menuitemCount == 0 || menuitemCount > 4 || menuitemCount <= 100) {
label += " Links. -> Links in Tabs öffnen."
}
aPopup._endOptOpenAllInTabs.setAttribute("label", label);
}
}
setTimeout(function() {
setFunction();
},50);
})();
Alles anzeigen
Das Skript ist für Sorbisch angepasst, deswegen sind da die Zeilen 61 bis 83 mehr Zeilen, als sie für Deutsch notwendig wären. Es geht hier um die Pluralformen. Deutsch hat ja nur Singular und Plural. Sorbisch hat Singular, Dual und zwei Pluralformen. Aber ich wollte es nur mal vorstellen, falls es jemand nicht kennt.