Hallo Mira_Belle.
Schön, dass Du wieder da bist. Hoffe Du hattest einen schönen
erholsamen Urlaub.
Gerne nehme ich Dein Angebot an und bitte um Zusendung des
Scriptes. Gerne auch nur per PN. Wie Du magst.
Viele Grüße
Endor
Hallo Mira_Belle.
Schön, dass Du wieder da bist. Hoffe Du hattest einen schönen
erholsamen Urlaub.
Gerne nehme ich Dein Angebot an und bitte um Zusendung des
Scriptes. Gerne auch nur per PN. Wie Du magst.
Viele Grüße
Endor
Hall FuchsFan.
Vielen Dank. Ist schon eingebaut.![]()
Mfg.
Endor
Hallo zusammen.
Habe mit diesem Script ein kleines Problem.
Linksklick funktioniert bestens. Definierte Adressen werden in neuen Tabs geöffnet.
Rechtsklick wird neues Fenster geöffnet, wie es soll, aber keine
neuen Tabs mit definierten Seiten geöffnet. Könnt ihr euch das mal anschauen.
(function() {
if (!window.gBrowser){
return;
}
// key: 0 = linke Maustatste
// key: 2 = rechte Maustatste
const quickLinks =
[
{"wLink": 'https://www.camp-firefox.de/forum', "key": 0},
{"wLink": 'https://www.thunderbird-mail.de/forum/board/71-manuelle-anpassungen-per-css-oder-script/', "key": 0},
{"wLink": 'https://github.com/Endor8/userChrome.js', "key": 0},
{"wLink": 'https://github.com/alice0775/userChrome.js', "key": 0},
{"wLink": 'https://www.camp-firefox.de/forum', "key": 2 },
{"wLink": 'https://www.thunderbird-mail.de/forum/board/71-manuelle-anpassungen-per-css-oder-script/', "key": 2},
{"wLink": 'https://github.com/Endor8/userChrome.js', "key": 2},
{"wLink": 'https://github.com/alice0775/userChrome.js', "key": 2},
];
try {
CustomizableUI.createWidget({
id: 'link-button',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var currentProfileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var props = {
id: 'link-button',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
removable: 'true',
label: 'Quicklink',
accesskey: '',
tooltiptext: 'Quicklinks:\nWetterbericht',
style: 'list-style-image: url("' + ("file:" + currentProfileDirectory + "/chrome/icons/Links.png") + '");',
};
for (var p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('link-button').addEventListener( 'click', function(event) {
let linkCaller=null;
let timeout=0;
if (event.button == 0) {
linkCaller = event.target;
}
else if (event.button == 2) {
event.preventDefault();
linkCaller = OpenBrowserWindow();
timeout=1000;
}
else
return;
setTimeout(function() {
let bFirstTabNewWindow=true;
quickLinks.forEach((weblink,nIndex) => {
if( event.button == 2 )
{
if( weblink["key"] == 2 )
{
if(bFirstTabNewWindow)
{
bFirstTabNewWindow = false;
linkCaller.documentGlobal.openWebLinkIn(weblink["wLink"],"current");
}
else
{
linkCaller.documentGlobal.openWebLinkIn(weblink["wLink"],"tab");
}
}
}
else if( event.button == 0 && weblink["key"] == 0 )
{
linkCaller.documentGlobal.openWebLinkIn(weblink["wLink"],"tab");
}
});
}, timeout);
}, true);
}) ();
Alles anzeigen
Konsole sagt:
Uncaught TypeError: can't access property "openWebLinkIn", linkCaller.documentGlobal is undefined
<anonymous> file:///C:/Users/xxxx/AppData/Roaming/Mozilla/Firefox/Profiles/u8c46bd1.Firefox144/chrome/wetterbericht.uc.js:74
<anonymous> file:///C:/Users/xxxx/AppData/Roaming/Mozilla/Firefox/Profiles/u8c46bd1.Firefox144/chrome/wetterbericht.uc.js:66
wetterbericht.uc.js:74:29
<anonym> file:///C:/Users/xxxx/AppData/Roaming/Mozilla/Firefox/Profiles/u8c46bd1.Firefox144/chrome/wetterbericht.uc.js:74
forEach self-hosted:145
<anonym> file:///C:/Users/xxxx/AppData/Roaming/Mozilla/Firefox/Profiles/u8c46bd1.Firefox144/chrome/wetterbericht.uc.js:66
Mfg.
Endor
Hallo FuchsFan.
Funktioniert bestens.
Vielen Dank.
Mfg.
Endor
Ja leider.
Habe diese Meldung bei vielen Scripten hier gesehen.
Das scheint also nichts wichtiges zu sein.
Mal abwarten was Alice macht.
Mfg.
Endor
Ja die Meldung habe ich hier auch, aber hier funktioniert diese Version einwandfrei.
Alice wird aber sicher bald mal wieder eine neue Version veröffentlichen.
Mfg.
Endor
Das müsste das hier sein.
Original ist von Alice. Diese hier ist die neueste Version und übersetzt auf Deutsch.
// ==UserScript==
// @name UndoListInTabmenuToo
// @namespace http://space.geocities.yahoo.co.jp/gl/alice0775
// @description UndoListInTabmenuToo.uc.js
// @include main
// @author Alice0775
// @compatibility Firefox 149
// @version 2026/01/16 00:00 fix bug
// @version 2026/01/13 00:00 compatibility 149 from 148
// @version 2026/01/07 Bug 2008041 - Make XUL disabled / checked attributes html-style boolean attributes.
// @version 2025/09/05 mark '*' for current index in the tooltip
// @version 2025/08/06 fix tooltip bug due to the change of 25/01/05
// @version 2025/07/26 add List All Tabs menu
// @version 2025/01/05 remove redundant menuitems
// @version 2025/01/05 fix bug
// @version 2024/12/22 fix Bug 1936336 - Disallow inline event handlers
// @version 2024/08/23 Bug 1690613 - Allow access to url/title/favIconUrl without "tabs" permission in session API
// @version 2023/06/16 08:00 Bug 1819675 - Expand recently closed tabs to include all Windows
// @version 2022/05/10 fix ref to context-media-eme-separator
// @version 2021/12/09 remove JSON.parse (Bug 1733425)
// @version 2021/04/25 fix 1689378
// @version 2019/11/14 remove eval
// @version 2019/06/30 10:00 Bug 1555060 Convert <tabs> to a custom element
// @version 2019/06/24 23:00 wait for gBrowser initialized
// @version 2019/05/21 08:30 fix 69.0a1 Bug 1551320 - Replace all createElement calls in XUL documents with createXULElement
// @version 2018/05/10 60
// @version 2017/11/18 nsIPrefBranch to nsIPrefBranch
// @version 2010/09/18 00:00 4.0b7pre
// @version 2009/02/03 13:00 Tab-Verlauf im Tooltip anzeigen
// @Note Fügt die UndoClose-Tab-Liste zu Tabs und Kontextmenüs hinzu
// @OriginalCode Orginalcode aus browser.js für populateUndoSubmenu verwenden
// @version 2018/05/09 15:00 61
// ==/UserScript==
// @version 2010/03/26 13:00 Minefield/3.7a4pre Bug 554991 - allow tab context menu to be modified by normal XUL overlays
// @version 2010/03/15 00:00 Minefield/3.7a4pre Bug 347930 - Tab strip should be a toolbar instead
// @version 2009/09/09 15:00 Mittelklick-Handhabung
// @version 2009/09/03 22:00 Firefox3.7a1pre Funktion wurde wieder hergestellt. (Bug 489925. getElementById should not return anonymous nodes)
// @version 2009/08/22 00:00 Firefox3.6 Ändern des stringbandle
// @version 2009/04/24 00:00 #394759 [Firefox:Session Restore]-Add undo close window feature
// @version 2008/10/12 18:00 Fx3.0.4pre Mittelklick-Popupmenü wurde nicht geschlossen und andere Korrekturen
// @version 2007/10/05 10:00
var UndoListInTabmenu = {
// -- config --
TABCONTEXTMENU : true , //Im Tabkontextmenü: anzeigen: true, nicht anzeigen: false
CONTEXTMENU : true, //Im Hauptkontextmenü: anzeigen: true , nicht anzeigen: false
// -- config end--
ss: null,
get tabContext() {
return document.getElementById("tabContextMenu");
},
get navigatorBundle() {
return Services.strings.createBundle(
"chrome://browser/locale/browser.properties"
);
},
init: function(){
if (this.TABCONTEXTMENU){
//Tabkontextmenü
var tabContext = this.tabContext;
this.makePopup(tabContext, null, "tabContextUndoList");
}
if (this.CONTEXTMENU){
//Hauptkontextmenü
var contextMenu = document.getElementById("contentAreaContextMenu");
var refItem = document.getElementById("context-media-eme-separator");
this.makePopup(contextMenu, refItem, "ContextUndoList");
}
// get closed-tabs from nsSessionStore
this._ss = SessionStore;
},
makePopup: function(popup, refItem, id){
var menu;
//label
const locale = "de";
// "Recently Closed Windows"
menu = document.createXULElement("menu");
menu.setAttribute("id", "historyUndoWindowMenu3");
menu.setAttribute("label", "K\u00FCrzlich geschlossene Fenster");
menu.setAttribute("accesskey", "F");
menu.toggleAttribute("disabled", false);
popup.insertBefore(menu, refItem);
menupopup = document.createXULElement("menupopup");
menu.appendChild(menupopup);
menupopup.setAttribute("id", "historyUndoWindowPopup3");
//menu.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoWindowSubmenu(this);");
menupopup.addEventListener("popupshowing", (event) => UndoListInTabmenu.populateUndoWindowSubmenu(event.currentTarget));
//Liste kürzlich geschossener Tabs
const LABELTEXT = "K\u00FCrzlich geschlossene Tabs"; //create menu
menu = document.createXULElement("menu");
menu.setAttribute("label", LABELTEXT);
menu.setAttribute("accesskey", "T");
if (id)
menu.setAttribute("id", id);
var menupopup = document.createXULElement("menupopup");
menupopup.addEventListener("popupshowing", () => UndoListInTabmenu.populateUndoSubmenu(menupopup));
//menupopup.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoSubmenu(this);");
menu.appendChild(menupopup);
popup.insertBefore(menu, refItem);
//All tabs menu
menu = document.createXULElement("menuitem");
menu.setAttribute("label", "Alle Tabs auflisten");
menu.setAttribute("accesskey", "A");
popup.insertBefore(menu, refItem);
menu.addEventListener("command", (event) => {document.getElementById("alltabs-button").click()})
//add event listener
popup.addEventListener('popupshowing',function(event) {
UndoListInTabmenu.toggleRecentlyClosedWindows(document.getElementById("historyUndoWindowMenu3"));
// no restorable tabs, so make sure menu is disabled, and return
UndoListInTabmenu.toggleRecentlyClosedTabs(document.getElementById("tabContextUndoList"));
});
},
toggleRecentlyClosedTabs: function toggleRecentlyClosedTabs(menu) {
// enable/disable the Recently Closed Windows sub menu
// no restorable windows, so disable menu
menu.toggleAttribute("disabled", this._ss.getClosedTabCount(window) == 0);
},
/**
* Populate when the history menu is opened (Fx3.6)
*/
populateUndoSubmenu: function(undoPopup) {
while (undoPopup.hasChildNodes()) {
undoPopup.removeChild(undoPopup.firstChild);
}
var utils = RecentlyClosedTabsAndWindowsMenuUtils;
var tabsFragment = utils.getTabsFragment(
window,
"menuitem",
/* aPrefixRestoreAll = */ true,
"menu-history-reopen-all-tabs"
);
undoPopup.appendChild(tabsFragment);
// populate tab historis for tooltip
var undoItems = UndoListInTabmenu._ss.getClosedTabDataForWindow(window);
for (var i = 0; i < undoItems.length; i++) {
var entries = undoItems[i].state.entries;
var tooltiptext = "";
for (var j = entries.length - 1; j > -1; j--){
if (j != entries.length - 1)
tooltiptext += "\n";
if (undoItems[i].state.index - 1 !== j) {
tooltiptext += parseInt(j + 1, 10) + ". " + entries[j].title;
} else {
tooltiptext += "*" + ". " + entries[j].title;
}
}
undoPopup.childNodes[i].setAttribute("tooltiptext", tooltiptext);
}
// "Append Clear undo close tb list"
undoPopup.appendChild(document.createXULElement("menuseparator"));
let m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", "Liste der letzten Tabs l\u00F6schen");
m.setAttribute("accesskey", "l");
m.addEventListener("command", function() {
let prefs = Services.prefs;
let max_undo = prefs.getIntPref("browser.sessionstore.max_tabs_undo");
prefs.setIntPref("browser.sessionstore.max_tabs_undo", 0);
prefs.setIntPref("browser.sessionstore.max_tabs_undo", max_undo);
}, false);
},
toggleRecentlyClosedWindows: function PHM_toggleRecentlyClosedWindows(menu) {
// enable/disable the Recently Closed Windows sub menu
// no restorable windows, so disable menu
menu.toggleAttribute("disabled", this._ss.getClosedWindowCount() == 0);
},
/**
* Populate when the history menu is opened
*/
populateUndoWindowSubmenu: function PHM_populateUndoWindowSubmenu(undoPopup) {
while (undoPopup.hasChildNodes()) {
undoPopup.removeChild(undoPopup.firstChild);
}
let utils = RecentlyClosedTabsAndWindowsMenuUtils;
let windowsFragment = utils.getWindowsFragment(
window,
"menuitem",
/* aPrefixRestoreAll = */ true,
"menu-history-reopen-all-windows"
);
undoPopup.appendChild(windowsFragment);
undoPopup.firstChild.setAttribute("accesskey", "R");
// "Append Clear undo close window list"
undoPopup.appendChild(document.createXULElement("menuseparator"));
m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", "Liste der kürzlich geschlossenen Fenster l\u00F6schen");
m.setAttribute("accesskey", "L");
m.addEventListener("command", function() {
for (let i = SessionStore.getClosedWindowCount() -1; i >= 0; i--)
SessionStore.forgetClosedWindow(i);
}, false);
}
};
// We should only start the redirection if the browser window has finished
// starting up. Otherwise, we should wait until the startup is done.
if (gBrowserInit.delayedStartupFinished) {
UndoListInTabmenu.init();
} else {
let delayedStartupFinished = (subject, topic) => {
if (topic == "browser-delayed-startup-finished" &&
subject == window) {
Services.obs.removeObserver(delayedStartupFinished, topic);
UndoListInTabmenu.init();
}
};
Services.obs.addObserver(delayedStartupFinished,
"browser-delayed-startup-finished");
}
Alles anzeigen
Quelle: https://github.com/alice0775/user…abmenuToo.uc.js
Mfg.
Endor
Hallo FuchsFan.
Gern geschehen. Ich danke dir für Script in #5.
Das passt perfekt für mich. Hatte schon mal so was
und ging schon lange nicht mehr. Also nochmals
Vielen Dank.
Mfg.
Endor
Hallo FuchsFan
Dein Script aus #4 zerhaut hier das Tabkontextmenü.
Bei den halben bereits vorhandenen Einträgen fehlt der Text.
Im Script aus #5, meinem Favoriten, ändere Zeile 35 mal so:
item.className = "menuitem";
so werden keine leeren Vierecke mehr angezeigt wie auch auf deinem Bild ersichtlich.
Mfg.
Endor
aber nur mit Hilfe KI
Na und. Stört mich überhaupt nicht.
Wichtig ist für mich nur, dass es jetzt so funktioniert wie ich es möchte.
Daher nochmals vielen Dank für Deine Hilfe.
Mfg.
Endor
FuchsFan
Prima. passt nun.
Vielen Dank.
Mfg.
Endor
Den Eintrag: Größe ändern habe ich hier auch nicht.
Keinerlei Anpassungen aktiv.
Kann sein, dass der noch nicht Flächendeckend aktiviert wurde.
Also mal beobachten. Oder es liegt an Windows 10pro hier.
Mfg.
Endor
Hallo FuchsFan
Das ist prima. Funktioniert .
Frage:
ließe sich das eventuell auch nur auf Menüleiste - Lesezeichen Popup beschränken?
Wenn nicht dann nehme ich das so.
Vielen vielen Dank für Deine Mühe.
Mfg.
Endor
Das Überlagerungsproblem besteht auch mit der neuen Version:
Sobald der Text des Ordners länger ist wird er überlagert.
In Deinem Script wird die Breite des Popups beeinflusst - fixiert.
Daher dieses Problem. Kann man die irgendwie flexibel machen?
Ps. Da ich keinen Slash möchte habe ich den entfernt.
Mfg.
Endor
Dann grätscht da was dazwischen.
Melde mich gleich.
Mfg.
Endor
Das liegt an diesem Script von @jeez - benzBrake zur Mehrspaltigen Anzeige
der Lesezeichen:
// ==UserScript==
// @name BMMultiColumn.uc.js
// @description Lesezeichenmenü automatisch in Spalten anzeigen (zuerst nach oben und unten, dann nach links und rechts).
// @author Ryan, ding
// @include main
// @charset UTF-8
// @version 2026.08.10
// @compatibility Firefox 153
// @async
// @shutdown window.BMMultiColumn.destroy();
// @homepageURL https://github.com/benzBrake/FirefoxCustomize/blob/master/userChromeJS
// @note 2026.08.10 Das Problem der wiederholten Zerstörung während des Hot-Reloads des Loaders wurde behoben, und es wurde verhindert, dass die vorzeitige Abmeldung gemeinsam genutzter Stile und die verzögerte Bereinigung neue Instanzen in Umgebungen mit mehreren Fenstern verunreinigten.
// @note 2026.04.09 Kompatibel mit den neuen Firefox-Regeln für die Breite des
// @note Lesezeichenmenüs; behebt ein Problem, bei dem mehrspaltige
// @note Lesezeichentitel nach dem Aufklappen nicht vollständig angezeigt wurden.
// @note 2025.07.03 Problem, dass das Überlaufmenüs der Lesezeichen-Symbolleiste nicht vollständig angezeigt wurde, behoben #50
// @note 2025.05.13 Optimiertes horizontales Scrollen dank ylcs006
// @note 2025.03.27 Behobene Höhen-/Breitenverwechselung, die zu einer Breitenanomalie führte, Unterstützung für vertikales Scrollrad
// @note 2025.02.19 fx133
// @note 2024.10.18 fx131
// @note 2024.10.07 fx131
// @note 2024.04.20 Fehler in der UC-Umgebung behoben, Hauptkommentar @include wurde nicht unterstützt
// @note 2022.12.22 Integrieren Sie bookmarksmenu_scrollbar.uc.js, um den Fehler zu beheben, dass die horizontale Bildlaufleiste auch dann angezeigt wird, wenn die maximale Breite nicht überschritten wird, und unterstützen Sie das Lesezeichenmenü des Hauptmenüs
// @note 2022.12.17 Anomalie der festen Breite. Wenn sich zu viele Lesezeichen in der Leiste befinden, kann sie nicht horizontal scrollen. Mit Script bookmarksmenu_scrollbar.uc.js abhilfe schaffen
// @note 2022.11.19 fx 108 Anpassung
// @note 2022.09.02 Fehler, dass das Menü die Anpassung der Breite verzögerte, wurde behoben
// @note Randprobleme behoben, Überlaufmenü der Lesezeichen-Symbolleiste wird unterstützt
// @note Problem wurde behoben, bei dem die Aktivierung manchmal fehlschlug
// @note Kompatibel mit Firefox 57+
// @ignorecache
// ==/UserScript==
location.href.startsWith("chrome://browser/content/browser.x") && (function (css) {
function uninitBMMultiColumn (instance) {
for (let i = 0; i < instance.menupopup.length; i++) {
clearInterval(instance.timer[i]);
instance.timer[i] = null;
const menupopup = document.getElementById(instance.menupopup[i]);
if (!menupopup) continue;
instance.resetPopup(menupopup);
menupopup.removeEventListener('popupshowing', instance, false);
menupopup.removeEventListener('DOMMenuItemActive', instance, false);
}
}
function hasOtherBMMultiColumnWindow () {
const windows = Services.wm.getEnumerator("navigator:browser");
while (windows.hasMoreElements()) {
const win = windows.getNext();
if (win !== window && win.BMMultiColumn && !win.BMMultiColumn._destroyed) {
return true;
}
}
return false;
}
function destroyBMMultiColumn (instance) {
if (!instance || instance._destroyed) return;
instance._destroyed = true;
window.removeEventListener('unload', instance, false);
window.removeEventListener("aftercustomization", instance, false);
if (window.BMMultiColumn === instance) {
delete window.BMMultiColumn;
}
uninitBMMultiColumn(instance);
if (!hasOtherBMMultiColumnWindow()
&& instance.style
&& instance.sss.sheetRegistered(instance.style, instance.sss.AUTHOR_SHEET)) {
instance.sss.unregisterSheet(instance.style, instance.sss.AUTHOR_SHEET);
}
instance.style = null;
}
destroyBMMultiColumn(window.BMMultiColumn);
window.BMMultiColumn = {
_destroyed: false,
menupopup: ["historyMenuPopup",
"bookmarksMenuPopup",
'PlacesToolbar',
'BMB_bookmarksPopup'],
timer: [],
count: [],
sss: Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService),
init: function () {
this.style = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
if (!this.sss.sheetRegistered(this.style, this.sss.AUTHOR_SHEET)) {
this.sss.loadAndRegisterSheet(this.style, this.sss.AUTHOR_SHEET);
}
window.removeEventListener("load", this, false);
window.addEventListener('unload', this, false);
window.addEventListener("aftercustomization", this, false);
this.delayedStartup();
},
delayedStartup: function () {
if (this._destroyed) return;
//wait till construction of bookmarksBarContent is completed.
for (var i = 0; i < this.menupopup.length; i++) {
clearInterval(this.timer[i]);
this.count[i] = 0;
this.timer[i] = setInterval(function (self, i) {
if (self._destroyed || ++self.count[i] > 50 || document.getElementById(self.menupopup[i])) {
clearInterval(self.timer[i]);
var menupopup = document.getElementById(self.menupopup[i]);
if (!self._destroyed && menupopup) {
menupopup.addEventListener('popupshowing', self, false);
menupopup.addEventListener('DOMMenuItemActive', self, false);
}
}
}, 250, this, i);
}
},
uninit: function () {
uninitBMMultiColumn(this);
},
destroy () {
destroyBMMultiColumn(this);
},
hasOtherActiveWindow () {
return hasOtherBMMultiColumnWindow();
},
handleEvent (event) {
if (this._destroyed) return;
switch (event.type) {
case 'popupshowing':
let menupopup;
if (event.target.tagName == 'menu' || event.target.tagName == 'toolbarbutton') {
menupopup = event.target.menupopup;
} else if (event.target.tagName == 'menupopup') {
menupopup = event.target;
} else return;
this.initHorizontalScroll(event);
if (menupopup.id === "PlacesChevronPopup") {
setTimeout(_ => {
if (!this._destroyed) {
this.initMultiColumn(menupopup, event);
}
}, 10);
} else {
this.initMultiColumn(menupopup, event);
}
break;
case 'aftercustomization':
setTimeout(() => this.delayedStartup(), 0);
break;
case 'unload':
this.destroy();
break;
}
},
initHorizontalScroll (event) {
let scrollBox = event.originalTarget.scrollBox;
scrollBox.scrollbox.style.setProperty("overflow-y", "auto", "important");
scrollBox.scrollbox.style.setProperty("margin-top", "0", "important");
scrollBox.scrollbox.style.setProperty("margin-bottom", "0", "important");
scrollBox.scrollbox.style.setProperty("padding-top", "0", "important");
scrollBox.scrollbox.style.setProperty("padding-bottom", "0", "important");
// Scroll-Tasten nach oben und unten
event.originalTarget.on_DOMMenuItemActive = function (event) {
/*
if (super.on_DOMMenuItemActive) {
super.on_DOMMenuItemActive(event);
}
*/
let elt = event.target;
if (elt.parentNode != this) {
return;
}
if (window.XULBrowserWindow) {
let placesNode = elt._placesNode;
var linkURI;
if (placesNode && PlacesUtils.nodeIsURI(placesNode)) {
linkURI = placesNode.uri;
} else if (elt.hasAttribute("targetURI")) {
linkURI = elt.getAttribute("targetURI");
}
if (linkURI) {
window.XULBrowserWindow.setOverLink(linkURI);
}
}
}.bind(event.originalTarget);
scrollBox._scrollButtonUp.style.display = "none";
scrollBox._scrollButtonDown.style.display = "none";
},
initMultiColumn (menupopup) {
menupopup.style.maxWidth = "calc(100vw - 20px)";
let arrowscrollbox = menupopup.shadowRoot.querySelector("::part(arrowscrollbox)");
let scrollbox = arrowscrollbox.shadowRoot.querySelector('[part~=scrollbox]');
if (scrollbox) {
Object.assign(scrollbox.style, {
minHeight: "21px",
height: "auto",
display: "flex",
flexFlow: "column wrap",
// overflow: "-moz-hidden-unscrollable",
width: "unset",
scrollSnapType: "x mandatory",
});
arrowscrollbox.style.width = "auto";
arrowscrollbox.style.maxHeight = "calc(100vh - 129px)";
let slot = scrollbox.querySelector('slot');
slot.style.display = "contents";
let maxWidth = calcWidth(-129);
let columnWidth = getColumnWidth(menupopup, maxWidth);
for (let item = menupopup.firstElementChild; item; item = item.nextElementSibling) {
if (!item.matches?.("menu, menuitem, menuseparator")) {
continue;
}
item.style.setProperty("min-width", "0", "important");
item.style.setProperty("max-width", columnWidth + "px", "important");
item.style.setProperty("width", columnWidth + "px", "important");
}
if (maxWidth < scrollbox.scrollWidth) {
scrollbox.style.setProperty("overflow-x", "auto", "important");
scrollbox.style.setProperty("width", maxWidth + "px");
} else {
scrollbox.style.setProperty("width", scrollbox.scrollWidth + "px", "important");
scrollbox.clientWidth = scrollbox.scrollWidth;
}
bindWheelEvent(scrollbox);
}
function bindWheelEvent (item) {
if (item._bmMultiColumnWheelHandler) return;
const wheelHandler = (e) => {
e.preventDefault();
const delta = e.deltaY || e.detail || e.wheelDelta;
item.scrollLeft += delta * 50;
};
item.addEventListener('wheel', wheelHandler, { passive: false });
item._bmMultiColumnWheelHandler = wheelHandler;
}
},
resetPopup (menupopup) {
let arrowscrollbox = menupopup?.shadowRoot?.querySelector("::part(arrowscrollbox)");
if (!arrowscrollbox) return;
menupopup.style.maxWidth = "";
arrowscrollbox.style.width = "";
arrowscrollbox.style.maxHeight = "";
let scrollbox = arrowscrollbox.shadowRoot.querySelector('[part~=scrollbox]');
if (!scrollbox) return;
if (scrollbox._bmMultiColumnWheelHandler) {
scrollbox.removeEventListener('wheel', scrollbox._bmMultiColumnWheelHandler);
delete scrollbox._bmMultiColumnWheelHandler;
}
let slot = scrollbox.querySelector('slot');
if (slot) {
slot.style.display = "";
}
Object.assign(scrollbox.style, {
minHeight: "",
height: "",
display: "",
flexFlow: "",
overflow: "",
overflowX: "",
overflowY: "",
maxHeight: "",
width: "",
scrollSnapType: "",
});
let menuitem = menupopup.lastElementChild;
while (menuitem) {
menuitem.style.minWidth = "";
menuitem.style.maxWidth = "";
menuitem.style.width = "";
menuitem = menuitem.previousElementSibling;
}
}
}
function getColumnWidth (menupopup, maxWidth) {
let fontSize = parseFloat(getComputedStyle(menupopup).fontSize) || 16;
let preferredWidth = Math.round(fontSize * 26);
let minWidth = Math.round(fontSize * 18);
return Math.max(Math.min(preferredWidth, maxWidth), Math.min(minWidth, maxWidth));
}
function calcWidth (offset) {
if (typeof offset == 'number') {
return window.innerWidth + offset;
} else if (typeof offset == 'string') {
if (/^-?\d+px$/.test(offset.trim())) {
return window.innerWidth + parseInt(offset.trim().match(/^-?(\d+)px$/)[1]);
}
}
throw new Error('Invalid offset value');
}
window.BMMultiColumn.init();
})(`
#PlacesToolbarItems menupopup {
max-width: calc(100vw - 20px);
max-height: calc(100vh - 129px);
}
#PlacesToolbarItems menupopup > * {
scroll-snap-align: start;
}
`)
Alles anzeigen
Jedes alleine geht, aber zusammen beißen sie sich.
Mfg.
Endor
Hallo zusammen.
Ich benutze das Script aus #32, Habe es für mich angepasst.
Nur leider habe ich unter Menüleiste- Lesezeichen eine Überlagerung.
Siehe Bild:
Hier mein verwendete Version:
// basiert auf Sript von BrokenHeart
// Firefox 154+
(function() {
if (!window.gBrowser)
return;
setTimeout(function() {
setFunction();
}, 50);
// Custom icons in profile/chrome/icons folder
let ProfilePath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons'));
let icon1 = "folder.png";
let icon2 = "sidebar-lesezeichen.png";
let cs_font_size = 16;
let cs_font_weight = 700;
let cs_font_color = "red";
// Fix: feste Spaltenbreite (anpassen, wenn du mehrstellig erwartest)
let colWidthCh = 4;
function setFunction() {
const css = `
#bmContent {
font-family: "Courier New", monospace !important;
font-size: ${cs_font_size}px !important;
font-weight: ${cs_font_weight} !important;
display: flex !important;
align-items: center !important;
justify-content: flex-end !important;
/* nach rechts drücken innerhalb von menu-text */
margin-left: auto !important;
height: 16px !important;
white-space: nowrap !important;
margin-top: -14px !important;
}
.bmIcon1 {
width: 18px;
height: 18px;
background: url("${ProfilePath}/${icon1}") no-repeat center;
background-size: 16px 16px;
/* Icon kommt NACH dem Wert => Abstand links ist das relevante */
margin-left: 6px;
margin-right: 0;
margin-top: -2px;
flex: 0 0 auto;
}
.bmIcon2 {
width: 18px;
height: 18px;
background: url("${ProfilePath}/${icon2}") no-repeat center;
background-size: 12px 12px;
margin-left: 6px;
margin-right: 0;
margin-top: -2px;
flex: 0 0 auto;
}
.bmValue {
color: ${cs_font_color} !important;
flex: 0 0 auto;
min-width: ${colWidthCh}ch; /* gleiche Flucht über Zeilen */
text-align: right;
}
.bmSlash {
color: ${cs_font_color} !important;
margin-left: 3px !important;
margin-right: -7px !important;
}
/* Hover-Farbwechsel */
menupopup[placespopup="true"] > menu.bookmark-item:hover > .menu-text > #bmContent .bmValue {
color: red !important;
fill: red !important;
}
menupopup[placespopup="true"] > menu.bookmark-item:hover > .menu-text > #bmContent .bmSlash {
color: #000 !important;
fill: #000 !important;
}
`;
const sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
const uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css));
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
let bookMenu = document.getElementById('bookmarksMenu');
let persToolBar = document.getElementById('PersonalToolbar');
if (bookMenu) {
bookMenu.addEventListener('popupshown', onPopupShowing);
}
if (persToolBar) {
persToolBar.addEventListener('popupshowing', onPopupShowing);
}
}
function onPopupShowing(aEvent) {
let popup = aEvent.originalTarget;
for (let item of popup.children) {
if (item.localName != 'menu' || item.id?.startsWith('history'))
continue;
setTimeout(() => {
let itemPopup = item.menupopup;
itemPopup.hidden = true;
itemPopup.collapsed = true;
itemPopup.openPopup();
itemPopup.hidePopup();
let menuitemCount = 0;
let menuCount = 0;
for (let subitem of itemPopup.children) {
if (subitem.classList.contains('bookmark-item') && !subitem.disabled && !subitem.hidden) {
if (subitem.localName == 'menuitem') {
menuitemCount++;
} else if (subitem.localName == 'menu') {
menuCount++;
}
}
}
itemPopup.hidden = false;
itemPopup.collapsed = false;
let bmCounta = item.childNodes[1];
bmCounta.innerHTML = "";
let bmContent = document.createElement("bmContent");
bmContent.id = "bmContent";
let strCountOut1 = menuCount; // Ordner
let strCountOut2 = menuitemCount; // Lesezeichen
// DOM: value1 + Icon1 + "/" + value2 + Icon2
let v1 = document.createElement("span");
v1.className = "bmValue";
v1.textContent = strCountOut1;
let icon1El = document.createElement("span");
icon1El.className = "bmIcon1";
let slash = document.createElement("span");
slash.className = "bmSlash";
slash.textContent = ""; // ohne Leerzeichen
let v2 = document.createElement("span");
v2.className = "bmValue";
v2.textContent = strCountOut2;
let icon2El = document.createElement("span");
icon2El.className = "bmIcon2";
bmContent.appendChild(v1);
bmContent.appendChild(icon1El);
bmContent.appendChild(slash);
bmContent.appendChild(v2);
bmContent.appendChild(icon2El);
bmCounta.appendChild(bmContent);
}, 100);
}
}
})();
Alles anzeigen
Lässt sich das eventuell anpassen.
Mfg.
Endor
Was steht bei Dir bei:
browser.search.region
in about:config?
DE
Wenn nicht mal ändern.
Mfg.
Endor
Danke.
Ist erledigt:
Mfg.
Endor
das Script verticale addonbar wurde nochmals aktualisiert.
Siehe hier:
Mfg.
Endor