- Firefox-Version
- 111.0.1
- Betriebssystem
- Win 10
Hallo,
dieses Script funktioniert leider nicht mehr in Firefox 111.0.1 64 bit.
Code
(function() {
if (!window.gBrowser)
return;
function setFunction() {
PlacesViewBase.prototype._mayAddCommandsItems = function PVB__mayAddCommandsItems(aPopup) {
if (aPopup == this._rootElt)
return;
let hasMultipleURIs = false;
if (aPopup._placesNode.childCount > 0) {
let currentChild = aPopup.firstElementChild;
let numURINodes = 0;
while (currentChild) {
if (currentChild.localName == "menuitem" && currentChild._placesNode) {
if (++numURINodes == 2)
break;
}
currentChild = currentChild.nextElementSibling;
}
hasMultipleURIs = numURINodes > 1;
}
if (!hasMultipleURIs)
aPopup.setAttribute("nofooterpopup", "true");
else
aPopup.removeAttribute("nofooterpopup");
if (!hasMultipleURIs) {
if (aPopup._endOptOpenAllInTabs) {
aPopup.removeChild(aPopup._endOptOpenAllInTabs);
aPopup._endOptOpenAllInTabs = null;
aPopup.removeChild(aPopup._endOptSeparator);
aPopup._endOptSeparator = null;
}
} else if (!aPopup._endOptOpenAllInTabs) {
aPopup._endOptSeparator = document.createXULElement("menuseparator");
aPopup._endOptSeparator.className = "bookmarks-actions-menuseparator";
aPopup.appendChild(aPopup._endOptSeparator);
aPopup._endOptOpenAllInTabs = document.createXULElement("menuitem");
aPopup._endOptOpenAllInTabs.className = "openintabs-menuitem";
if (typeof this.options.extraClasses.entry == "string") {
aPopup._endOptOpenAllInTabs.classList.add(
this.options.extraClasses.entry
);
}
if (typeof this.options.extraClasses.footer == "string") {
aPopup._endOptOpenAllInTabs.classList.add(
this.options.extraClasses.footer
);
}
aPopup._endOptOpenAllInTabs.setAttribute(
"oncommand",
"PlacesUIUtils.openMultipleLinksInTabs(this.parentNode._placesNode, event, " +
"PlacesUIUtils.getViewForNode(this));"
);
aPopup._endOptOpenAllInTabs.setAttribute(
"onclick",
"checkForMiddleClick(this, event); event.stopPropagation();"
);
let menuitemsCount = 0;
for (let node of aPopup.childNodes) {
if (node.localName == 'menuitem')
menuitemsCount++;
}
aPopup._endOptOpenAllInTabs.setAttribute(
"label",
" " + menuitemsCount + " <- " + gNavigatorBundle.getString("menuOpenAllInTabs.label")
);
aPopup.appendChild(aPopup._endOptOpenAllInTabs);
}
}
}
let intID = setInterval(function() {
if (window.PlacesViewBase) {
clearInterval(intID);
setFunction();
}
}, 500);
})();
Alles anzeigen
es zeigt die Anzahl der Lesezeichen als Zahl an.
könnte man es wieder zum laufen bringen ?