1. Nachrichten
  2. Forum
    1. Unerledigte Themen
    2. Forenregeln
  3. Spenden
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. camp-firefox.de
  2. FuchsFan

Beiträge von FuchsFan

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • FuchsFan
    • 24. August 2026 um 14:55
    Zitat von 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.

    Endor

    Getestet in Nightly, funktioniert auch wieder.

    JavaScript
    (function() {
    
        "use strict";
    
        if (!window.gBrowser) {
            return;
        }
    
    
        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}
        ];
    
    
        /*
         * ============================================================
         * Vorhandenes Widget entfernen
         * ============================================================
         */
    
        try {
            if (CustomizableUI.getWidget("link-button")) {
                CustomizableUI.destroyWidget("link-button");
            }
        } catch (e) {
            console.error("Quicklink: destroyWidget:", e);
        }
    
    
        /*
         * ============================================================
         * Links im aktuellen Fenster öffnen
         *
         * loadTabs() öffnet alle URLs in einem einzigen Aufruf.
         * ============================================================
         */
    
        function openCurrentWindow() {
    
            const urls = quickLinks
                .filter(function(item) {
                    return item.key === 0;
                })
                .map(function(item) {
                    return item.wLink;
                });
    
    
            if (!urls.length || !window.gBrowser) {
                return;
            }
    
    
            try {
    
                window.gBrowser.loadTabs(
                    urls,
                    {
                        inBackground: false,
                        replace: false,
                        triggeringPrincipal:
                            Services.scriptSecurityManager
                                .getSystemPrincipal()
                    }
                );
    
            } catch (e) {
    
                console.error(
                    "Quicklink: loadTabs:",
                    e
                );
    
            }
    
        }
    
    
        /*
         * ============================================================
         * Neues Fenster
         *
         * Wir verwenden OpenBrowserWindow() wie im ursprünglichen
         * Script und warten auf die vollständige Initialisierung.
         * ============================================================
         */
    
        function openNewWindow() {
    
            let newWin;
    
            try {
    
                newWin = OpenBrowserWindow();
    
            } catch (e) {
    
                console.error(
                    "Quicklink: OpenBrowserWindow:",
                    e
                );
    
                return;
            }
    
    
            const urls = quickLinks
                .filter(function(item) {
                    return item.key === 2;
                })
                .map(function(item) {
                    return item.wLink;
                });
    
    
            if (!urls.length) {
                return;
            }
    
    
            /*
             * Firefox-Signal für ein vollständig gestartetes
             * Browserfenster.
             */
            const observer = {
    
                observe(subject, topic) {
    
                    if (
                        topic !==
                            "browser-delayed-startup-finished" ||
                        subject !== newWin
                    ) {
                        return;
                    }
    
    
                    Services.obs.removeObserver(
                        observer,
                        "browser-delayed-startup-finished"
                    );
    
    
                    loadIntoNewWindow();
    
                }
    
            };
    
    
            function loadIntoNewWindow() {
    
                if (
                    !newWin ||
                    newWin.closed ||
                    !newWin.gBrowser
                ) {
                    return;
                }
    
    
                try {
    
                    /*
                     * Der erste URL ersetzt den vorhandenen Tab,
                     * die restlichen werden als neue Tabs angehängt.
                     */
                    newWin.gBrowser.loadTabs(
                        urls,
                        {
                            inBackground: false,
                            replace: true,
                            triggeringPrincipal:
                                Services.scriptSecurityManager
                                    .getSystemPrincipal()
                        }
                    );
    
                } catch (e) {
    
                    console.error(
                        "Quicklink: loadTabs neues Fenster:",
                        e
                    );
    
                }
    
            }
    
    
            Services.obs.addObserver(
                observer,
                "browser-delayed-startup-finished"
            );
    
    
            /*
             * Falls das Fenster bereits vollständig gestartet war,
             * bevor der Observer registriert wurde.
             */
            setTimeout(function() {
    
                try {
    
                    if (
                        newWin &&
                        !newWin.closed &&
                        newWin.gBrowser
                    ) {
    
                        Services.obs.removeObserver(
                            observer,
                            "browser-delayed-startup-finished"
                        );
    
                        loadIntoNewWindow();
    
                    }
    
                } catch (e) {
    
                    console.error(
                        "Quicklink: Fensterprüfung:",
                        e
                    );
    
                }
    
            }, 500);
    
        }
    
    
        /*
         * ============================================================
         * WIDGET
         * ============================================================
         */
    
        try {
    
            CustomizableUI.createWidget({
    
                id: "link-button",
    
                type: "custom",
    
                defaultArea: CustomizableUI.AREA_NAVBAR,
    
    
                onBuild: function(aDocument) {
    
                    const profileDirectory =
                        Services.dirsvc
                            .get("ProfD", Ci.nsIFile)
                            .path
                            .replace(/\\/g, "/");
    
    
                    const toolbaritem =
                        aDocument.createXULElement(
                            "toolbarbutton"
                        );
    
    
                    toolbaritem.id = "link-button";
    
    
                    toolbaritem.className =
                        "toolbarbutton-1 " +
                        "chromeclass-toolbar-additional";
    
    
                    toolbaritem.setAttribute(
                        "removable",
                        "true"
                    );
    
    
                    toolbaritem.setAttribute(
                        "label",
                        "Quicklink"
                    );
    
    
                    toolbaritem.setAttribute(
                        "tooltiptext",
                        "Quicklinks:\n" +
                        "Linksklick: aktuelles Fenster\n" +
                        "Rechtsklick: neues Fenster"
                    );
    
    
                    toolbaritem.setAttribute(
                        "style",
                        'list-style-image: url("file:' +
                        profileDirectory +
                        '/chrome/icons/Links.png");'
                    );
    
    
                    /*
                     * =================================================
                     * DER ENTSCHEIDENDE TEIL
                     *
                     * Wir hängen den Listener direkt an den
                     * tatsächlich erzeugten toolbarbutton.
                     *
                     * Nicht onCommand.
                     * Nicht CustomizableUI.onClick.
                     * =================================================
                     */
    
                    toolbaritem.addEventListener(
                        "click",
                        function(event) {
    
                            console.log(
                                "Quicklink click:",
                                event.button
                            );
    
    
                            /*
                             * Linksklick
                             */
                            if (event.button === 0) {
    
                                event.preventDefault();
                                event.stopPropagation();
    
                                openCurrentWindow();
    
                                return;
                            }
    
    
                            /*
                             * Rechtsklick
                             */
                            if (event.button === 2) {
    
                                event.preventDefault();
                                event.stopPropagation();
    
                                openNewWindow();
    
                                return;
                            }
    
                        },
                        true
                    );
    
    
                    return toolbaritem;
    
                }
    
            });
    
    
            console.log(
                "Quicklink: Widget erstellt"
            );
    
    
        } catch (e) {
    
            console.error(
                "Quicklink: createWidget:",
                e
            );
    
        }
    
    })();
    Alles anzeigen
  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 24. August 2026 um 14:08
    Zitat von Endor

    Vielen Dank. Ist schon eingebaut. :)

    Endor

    Freut mich, wenn du es verwenden kannst.:thumbup:

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 22. August 2026 um 21:58
    Zitat von Endor

    Funktioniert bestens.
    Vielen Dank.

    Endor

    Freut mich, gern geschehen.:)

    Hier noch ein Script im Angebot zum Test.

    JavaScript
    //  TabCloseButton.uc.js
    //  „Linke Tabs schließen“ und „Rechte Tabs schließen“ heißt, ab dem aktuellen Tab
    //  gibt es keine Auswahl dafür, so werden die Einträge ausgegraut
    //  alle Schließvorgänge müssen im Warndialog bestätigt werden 
    //  Menü für "Kürzlich geschlossene Tabs" wird zusätzlich erstellt
    
    (function() {
      if (!window.gBrowser || !CustomizableUI) return;
    
      // === User Einstellungen ===
      let btn_id = 'alle_tabs_close';
      const btn_icon = 'warnung2.png';
      const iconPath = 'file:///C:/FoxIcons/';
      const ImagePath = iconPath + btn_icon;
      const btn_label = 'Tabs verwalten';
      const btn_tooltiptext = 'Tabs verwalten';
      // ===========================
    
      // ---------------------------
      // Styled confirm (Promise-based)
      // ---------------------------
      function showStyledConfirm(message, okLabel = 'Schließen', cancelLabel = 'Abbrechen') {
        return new Promise(resolve => {
          const existing = document.getElementById('ucjs_styled_confirm_overlay');
          if (existing) existing.remove();
    
          let overlay = document.createElement('div');
          overlay.id = 'ucjs_styled_confirm_overlay';
          overlay.style.position = 'fixed';
          overlay.style.left = '0';
          overlay.style.top = '0';
          overlay.style.width = '100%';
          overlay.style.height = '100%';
          overlay.style.zIndex = '999999';
          overlay.style.display = 'flex';
          overlay.style.alignItems = 'center';
          overlay.style.justifyContent = 'center';
          overlay.style.background = 'rgba(0,0,0,0.35)';
    
          let box = document.createElement('div');
          box.style.minWidth = '380px';
          box.style.maxWidth = '720px';
          box.style.padding = '18px';
          box.style.borderRadius = '8px';
          box.style.background = 'linear-gradient(#fff,#f6f6f6)';
          box.style.boxShadow = '0 10px 30px rgba(0,0,0,0.4)';
          box.style.fontFamily = 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial';
          box.style.color = '#111';
    
          let msg = document.createElement('div');
          msg.textContent = message;
          msg.style.fontSize = '16px';
          msg.style.fontWeight = '500';
          msg.style.marginBottom = '14px';
          msg.style.lineHeight = '1.3';
    
          let btnRow = document.createElement('div');
          btnRow.style.display = 'flex';
          btnRow.style.justifyContent = 'flex-end';
          btnRow.style.gap = '8px';
    
          let btnCancel = document.createElement('button');
          btnCancel.textContent = cancelLabel;
          btnCancel.style.padding = '6px 10px';
          btnCancel.style.borderRadius = '4px';
          btnCancel.style.border = '1px solid #888';
          btnCancel.style.background = '#fff';
    
          let btnOK = document.createElement('button');
          btnOK.textContent = okLabel;
          btnOK.style.padding = '6px 10px';
          btnOK.style.borderRadius = '4px';
          btnOK.style.border = '0';
          btnOK.style.background = '#d9534f';
          btnOK.style.color = '#fff';
          btnOK.style.fontWeight = '500';
    
          function keyHandler(e) {
            if (e.key === 'Escape') { cleanup(); resolve(false); }
            if (e.key === 'Enter')  { cleanup(); resolve(true); }
          }
    
          function cleanup() {
            window.removeEventListener('keydown', keyHandler, true);
            overlay.remove();
          }
    
          btnCancel.addEventListener('click', () => { cleanup(); resolve(false); });
          btnOK.addEventListener('click', () => { cleanup(); resolve(true); });
    
          btnRow.appendChild(btnCancel);
          btnRow.appendChild(btnOK);
          box.appendChild(msg);
          box.appendChild(btnRow);
          overlay.appendChild(box);
          document.documentElement.appendChild(overlay);
    
          btnCancel.focus();
          window.addEventListener('keydown', keyHandler, true);
        });
      }
    
      // ---------------------------
      // Widget erstellen (falls nicht vorhanden)
      // ---------------------------
      try {
        CustomizableUI.createWidget({
          id: btn_id,
          defaultArea: CustomizableUI.AREA_NAVBAR,
          label: btn_label,
          tooltiptext: btn_tooltiptext,
          onCreated: (this_button) => {
            this_button.style.MozContextProperties = 'fill, stroke, fill-opacity, stroke-opacity';
            this_button.style.listStyleImage = 'url("' + ImagePath + '")';
            this_button.style.minWidth = 'fit-content';
            this_button.setAttribute('role', 'button');
          }
        });
      } catch (e) {
        // Widget eventuell schon vorhanden
      }
    
      // ---------------------------
      // UndoListInTabmenu (gekapselt, angepasst)
      // ---------------------------
      const UndoListInTabmenu = {
        _ss: SessionStore,
    
        populateUndoSubmenu(undoPopup) {
          if (!undoPopup) return;
          while (undoPopup.hasChildNodes()) undoPopup.removeChild(undoPopup.firstChild);
    
          let utils = RecentlyClosedTabsAndWindowsMenuUtils;
          let tabsFragment = utils.getTabsFragment(window, "menuitem", true, "menu-history-reopen-all-tabs");
          undoPopup.appendChild(tabsFragment);
    
          let undoItems = this._ss.getClosedTabDataForWindow(window) || [];
          for (let i = 0; i < undoItems.length; i++) {
            let entries = undoItems[i].state.entries;
            let tooltiptext = "";
            for (let 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;
              }
            }
            if (undoPopup.childNodes[i]) {
              undoPopup.childNodes[i].setAttribute("tooltiptext", tooltiptext);
            }
          }
    
          undoPopup.appendChild(document.createXULElement("menuseparator"));
    
          let m = undoPopup.appendChild(document.createXULElement("menuitem"));
          m.setAttribute("label", "Liste der letzten Tabs löschen");
          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);
        }
      };
    
      // ---------------------------
      // Popup + Menüpunkte erzeugen
      // ---------------------------
      function ensurePopup() {
        if (document.getElementById(btn_id + '_popup')) return;
    
        let popup = document.createXULElement ? document.createXULElement('menupopup') : document.createElement('menupopup');
        popup.id = btn_id + '_popup';
        popup.setAttribute('class', 'toolbarbutton-popup');
        popup.setAttribute('position', 'after_start');
    
        function makeItem(id, label, accesskey, klass) {
          let it = document.createXULElement ? document.createXULElement('menuitem') : document.createElement('menuitem');
          it.id = id;
          it.setAttribute('label', label);
          if (accesskey) it.setAttribute('accesskey', accesskey);
          it.setAttribute('class', klass || 'menuitem');
          return it;
        }
    
        // Linke, Rechte, Alle
        let miLeft  = makeItem(btn_id + '_left',  'Linke Tabs schließen',  'L');
        let miRight = makeItem(btn_id + '_right', 'Rechte Tabs schließen', 'R');
        let miAll   = makeItem(btn_id + '_all',   'Alle Tabs schließen',   'A', 'menuitem danger');
    
        // Separator
        let sep = document.createXULElement ? document.createXULElement('menuseparator') : document.createElement('menuseparator');
    
        // Kürzlich geschlossene Tabs (aus UndoListInTabmenu)
        let menuRecent = document.createXULElement ? document.createXULElement('menu') : document.createElement('menu');
        menuRecent.setAttribute('label', 'Kürzlich geschlossene Tabs');
        menuRecent.setAttribute('accesskey', 'T');
        menuRecent.id = btn_id + '_recent_menu';
        let popupForTabs = document.createXULElement ? document.createXULElement('menupopup') : document.createElement('menupopup');
        popupForTabs.id = btn_id + '_recent_popup';
        popupForTabs.addEventListener('popupshowing', function() {
          UndoListInTabmenu.populateUndoSubmenu(popupForTabs);
        });
    
        menuRecent.appendChild(popupForTabs);
    
        // "Alle Tabs auflisten" (öffnet built-in alltabs-button)
        let menuAllList = document.createXULElement ? document.createXULElement('menuitem') : document.createElement('menuitem');
        menuAllList.setAttribute('label', 'Alle Tabs auflisten');
        menuAllList.setAttribute('accesskey', 'A');
        menuAllList.addEventListener('command', () => {
          let alltabsButton = document.getElementById("alltabs-button");
          if (alltabsButton) alltabsButton.click();
        });
    
        // Append alles zum popup
        popup.appendChild(miLeft);
        popup.appendChild(miRight);
        popup.appendChild(miAll);
        popup.appendChild(sep);
        popup.appendChild(menuRecent);
        popup.appendChild(menuAllList);
    
        let toolbox = document.getElementById('navigator-toolbox') || document.body;
        toolbox.appendChild(popup);
    
        // Hilfsfunktion: robusten Index eines Tabs ermitteln
        function tabIndex(t) {
          return (typeof t._tPos === 'number') ? t._tPos : (typeof t.index === 'number' ? t.index : -1);
        }
    
        // Dynamisch: vor Anzeige prüfen, ob links/rechts Tabs vorhanden sind
        popup.addEventListener('popupshown', function() {
          let current = gBrowser.selectedTab;
          if (!current) {
            miLeft.disabled = true;
            miRight.disabled = true;
            miAll.disabled = (gBrowser.tabs.length <= 0);
            return;
          }
    
          let currentIndex = tabIndex(current);
          let hasLeft = false, hasRight = false;
          for (let i = 0; i < gBrowser.tabs.length; i++) {
            let t = gBrowser.tabs[i];
            let idx = tabIndex(t);
            if (idx < currentIndex && !t.pinned) hasLeft = true;
            if (idx > currentIndex && !t.pinned) hasRight = true;
            if (hasLeft && hasRight) break;
          }
    
          miLeft.disabled  = !hasLeft;
          miRight.disabled = !hasRight;
          miAll.disabled   = (gBrowser.tabs.length <= 0);
        });
    
        // Fallback: manche Builds feuern popupshowing statt popupshown
        popup.addEventListener('popupshowing', function() {
          let ev = new Event('popupshown');
          popup.dispatchEvent(ev);
        });
    
        // === Handler: Linke schließen ===
        miLeft.addEventListener('command', async function() {
          let current = gBrowser.selectedTab;
          if (!current) return;
          if (!(await showStyledConfirm('Warnung: Alle Tabs links vom aktuellen Tab werden geschlossen. Fortfahren?', 'Schließen', 'Abbrechen'))) return;
    
          let currentIndex = tabIndex(current);
          let toClose = [];
          for (let i = 0; i < gBrowser.tabs.length; i++) {
            let t = gBrowser.tabs[i];
            let idx = tabIndex(t);
            if (idx < currentIndex && !t.pinned) toClose.push(t);
          }
          for (let i = toClose.length - 1; i >= 0; i--) {
            try { gBrowser.removeTab(toClose[i]); } catch (e) { console.error(e); }
          }
        });
    
        // === Handler: Rechte schließen ===
        miRight.addEventListener('command', async function() {
          let current = gBrowser.selectedTab;
          if (!current) return;
          if (!(await showStyledConfirm('Warnung: Alle Tabs rechts vom aktuellen Tab werden geschlossen. Fortfahren?', 'Schließen', 'Abbrechen'))) return;
    
          let currentIndex = tabIndex(current);
          let toClose = [];
          for (let i = 0; i < gBrowser.tabs.length; i++) {
            let t = gBrowser.tabs[i];
            let idx = tabIndex(t);
            if (idx > currentIndex && !t.pinned) toClose.push(t);
          }
          for (let i = toClose.length - 1; i >= 0; i--) {
            try { gBrowser.removeTab(toClose[i]); } catch (e) { console.error(e); }
          }
        });
    
        // === Handler: Alle schließen ===
        miAll.addEventListener('command', async function() {
          if (!(await showStyledConfirm('Warnung: Alle Tabs werden geschlossen. Fortfahren?', 'Schließen', 'Abbrechen'))) return;
          let tabs = Array.from(gBrowser.tabs);
          for (let i = tabs.length - 1; i >= 0; i--) {
            try { gBrowser.removeTab(tabs[i]); } catch (e) { console.error(e); }
          }
        });
      }
    
      // ---------------------------
      // Klick-Handler: öffnet Popup über Button (nur linker Klick)
      // ---------------------------
      function attachClickHandler() {
        let btn = document.getElementById(btn_id);
        if (!btn) return;
    
        ensurePopup();
    
        btn.removeEventListener('click', _onClick);
    
        function _onClick(event) {
          if (event.button !== 0) return;
          let popup = document.getElementById(btn_id + '_popup');
          if (!popup) return;
          try {
            popup.openPopup(btn, 'after_start', 0, 0, true);
          } catch (e) {
            try { popup.showPopup(btn, -1, -1, 'popup', 'bottomleft'); } catch (err) { console.error(err); }
          }
        }
    
        btn.addEventListener('click', _onClick);
      }
    
      // Initialisierung / Hooks
      if (window.readyState !== "loading") {
        setTimeout(attachClickHandler, 200);
      } else {
        window.addEventListener("DOMContentLoaded", attachClickHandler, { once: true });
      }
    
      window.addEventListener('aftercustomization', () => {
        setTimeout(attachClickHandler, 100);
      });
    
      // Cleanup bei Unload
      window.addEventListener('unload', () => {
        let popup = document.getElementById(btn_id + '_popup');
        if (popup && popup.parentNode) popup.parentNode.removeChild(popup);
        let overlay = document.getElementById('ucjs_styled_confirm_overlay');
        if (overlay && overlay.parentNode) overlay.parentNode.removeChild(overlay);
      });
    })();
    Alles anzeigen
  • Benutzerskripte funktionieren seit Version 138 teilweise nicht mehr

    • FuchsFan
    • 22. August 2026 um 08:55
    Zitat von Stoiker

    Kann jemand weiterhelfen, sodass die Anzeige wieder rechtsbündig ist?

    Meinst du das so?

    JavaScript
    (function() {
    
        if (!window.gBrowser)
            return;
        
        setTimeout(function() {
            setFunction();
        }, 50);
    
        function setFunction() {
    
            const css = `
                /* Label selbst muss relativ sein, damit das Pseudo-Element absolut positioniert werden kann */
                .countClass {
                    position: relative;
                    padding-right: 2.5em; /* Platz für die Zählung rechts */
                }
    
                /* ::after absolut rechts positioniert */
                .countClass::after {
                    content: attr(data-value);
                    position: absolute;
                    right: 0.25em;
                    top: 50%;
                    transform: translateY(-50%);
                    color: white;
                    background: rgba(0,0,0,0.3);
                    padding: 0 0.25em;
                    border-radius: 0.25em;
                    font-size: 0.9em;
                    white-space: nowrap;
                    pointer-events: none;
                }
            `;
    
            try {
                const sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
                const uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css));
                if (!sss.sheetRegistered(uri, sss.AGENT_SHEET)) {
                    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
                }
            } catch (e) {
                console.error("Fehler beim Registrieren des Stylesheets:", e);
            }
    
            let bmbMenu = document.getElementById('bookmarks-menu-button');
            let bookMenu = document.getElementById('bookmarksMenu');
            let persToolBar = document.getElementById('PersonalToolbar');
            
            if (bmbMenu)
                bmbMenu.addEventListener('popupshowing', onPopupShowing ); 
            if (bookMenu)
                bookMenu.addEventListener('popupshowing', onPopupShowing ); 
            if (persToolBar)
                persToolBar.addEventListener('popupshowing', onPopupShowing ); 
        }
        
        function onPopupShowing(aEvent) {
            
            let popup = aEvent.originalTarget;
            if (!popup || !popup.children) return;
    
            for (let item of popup.children) {
                if (item.localName != 'menu' || item.id?.startsWith('history'))
                    continue;
                // kleiner Timeout zum Auffinden der child-popup Elemente
                setTimeout(() => {
                  try {
                    let itemPopup = item.menupopup;
                    if (!itemPopup) return;
                    // Öffnen/Schließen nur, wenn nötig
                    itemPopup.openPopup && itemPopup.openPopup();
                    itemPopup.hidePopup && itemPopup.hidePopup();
    
                    let menuitemCount = 0;
                    let menuCount = 0;
                    for (let subitem of itemPopup.children) {
                      if (subitem.classList && subitem.classList.contains('bookmark-item') && !subitem.disabled && !subitem.hidden) {
                        if (subitem.localName == 'menuitem') {
                          menuitemCount++;
                        } else if (subitem.localName == 'menu') {
                          menuCount++;
                        }
                      }
                    }
    
                    // robuster Label-Finder: suche gezielt nach .menu-iconic-text
                    let label = item.querySelector('.menu-iconic-text') || item.querySelector('label') || item.childNodes[1];
                    if (!label) return;
    
                    label.classList.add('countClass');
                    let strCountOut = menuCount + "/" + menuitemCount;
                    label.setAttribute('data-value', strCountOut);
    
                  } catch (e) {
                    console.error("Fehler im onPopupShowing-Handler:", e);
                  }
                }, 80);
            }
        }
        
    })();
    Alles anzeigen
  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 21. August 2026 um 20:32

    Testet mal bitte, ohne Fehler in Nightly.

    JavaScript
    // ==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
    // ==/UserScript==
    
    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() {
        if (this.TABCONTEXTMENU) {
          let tabContext = this.tabContext;
          if (tabContext) {
            this.makePopup(tabContext, null, "tabContextUndoList");
          }
        }
    
        if (this.CONTEXTMENU) {
          let contextMenu = document.getElementById("contentAreaContextMenu");
          let refItem = document.getElementById("context-media-eme-separator");
          if (contextMenu) {
            this.makePopup(contextMenu, refItem, "ContextUndoList");
          }
        }
    
        // get closed-tabs from nsSessionStore
        this._ss = SessionStore;
      },
    
      makePopup(popup, refItem, id) {
        if (!popup) return;
    
        // "Recently Closed Windows"
        let 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);
    
        let menupopup = document.createXULElement("menupopup");
        menu.appendChild(menupopup);
        menupopup.setAttribute("id", "historyUndoWindowPopup3");
        menupopup.addEventListener("popupshowing", (event) =>
          UndoListInTabmenu.populateUndoWindowSubmenu(event.currentTarget)
        );
    
        // Liste kürzlich geschlossener Tabs
        const LABELTEXT = "K\u00FCrzlich geschlossene Tabs";
        menu = document.createXULElement("menu");
        menu.setAttribute("label", LABELTEXT);
        menu.setAttribute("accesskey", "T");
        if (id) menu.setAttribute("id", id);
    
        let popupForTabs = document.createXULElement("menupopup");
        popupForTabs.addEventListener("popupshowing", () =>
          UndoListInTabmenu.populateUndoSubmenu(popupForTabs)
        );
        menu.appendChild(popupForTabs);
        popup.insertBefore(menu, refItem);
    
        // All tabs menu
        let menuitem = document.createXULElement("menuitem");
        menuitem.setAttribute("label", "Alle Tabs auflisten");
        menuitem.setAttribute("accesskey", "A");
        popup.insertBefore(menuitem, refItem);
        menuitem.addEventListener("command", () => {
          let alltabsButton = document.getElementById("alltabs-button");
          if (alltabsButton) alltabsButton.click();
        });
    
        // add event listener for toggling submenus
        popup.addEventListener("popupshowing", () => {
          UndoListInTabmenu.toggleRecentlyClosedWindows(
            document.getElementById("historyUndoWindowMenu3")
          );
          UndoListInTabmenu.toggleRecentlyClosedTabs(
            document.getElementById("tabContextUndoList")
          );
        });
      },
    
      toggleRecentlyClosedTabs(menu) {
        if (!menu || !this._ss) return;
        menu.toggleAttribute("disabled", this._ss.getClosedTabCount(window) === 0);
      },
    
      populateUndoSubmenu(undoPopup) {
        if (!undoPopup) return;
    
        while (undoPopup.hasChildNodes()) {
          undoPopup.removeChild(undoPopup.firstChild);
        }
    
        let utils = RecentlyClosedTabsAndWindowsMenuUtils;
        let tabsFragment = utils.getTabsFragment(
          window,
          "menuitem",
          /* aPrefixRestoreAll = */ true,
          "menu-history-reopen-all-tabs"
        );
        undoPopup.appendChild(tabsFragment);
    
        // populate tab histories for tooltip
        let undoItems = this._ss.getClosedTabDataForWindow(window) || [];
        for (let i = 0; i < undoItems.length; i++) {
          let entries = undoItems[i].state.entries;
          let tooltiptext = "";
          for (let 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;
            }
          }
          if (undoPopup.childNodes[i]) {
            undoPopup.childNodes[i].setAttribute("tooltiptext", tooltiptext);
          }
        }
    
        // "Append Clear undo close tab 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(menu) {
        if (!menu || !this._ss) return;
        menu.toggleAttribute("disabled", this._ss.getClosedWindowCount() === 0);
      },
    
      populateUndoWindowSubmenu(undoPopup) {
        if (!undoPopup) return;
    
        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);
        if (undoPopup.firstChild) undoPopup.firstChild.setAttribute("accesskey", "R");
    
        // "Append Clear undo close window list"
        undoPopup.appendChild(document.createXULElement("menuseparator"));
    
        let m = undoPopup.appendChild(document.createXULElement("menuitem"));
        m.setAttribute("label", "Liste der k\u00FCrzlich 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
        );
      },
    };
    
    // Start-Logik: robust gegen fehlende gBrowserInit-Variable
    if (typeof gBrowserInit !== "undefined" && gBrowserInit && gBrowserInit.delayedStartupFinished) {
      UndoListInTabmenu.init();
    } else {
      // Fallback: warte auf browser-delayed-startup-finished für dieses window
      const delayedStartupFinished = (subject, topic) => {
        if (topic === "browser-delayed-startup-finished" && subject === window) {
          try {
            Services.obs.removeObserver(delayedStartupFinished, "browser-delayed-startup-finished");
          } catch (e) {
            // ignore removal errors
          }
          UndoListInTabmenu.init();
        }
      };
      Services.obs.addObserver(delayedStartupFinished, "browser-delayed-startup-finished");
    }
    Alles anzeigen
  • Andere Tabs schließen?

    • FuchsFan
    • 21. August 2026 um 18:56
    Zitat von Mitleser

    Dies ist dann die 'große' Lösung:

    Gut gemacht, das gefällt mir.:thumbup:

  • Andere Tabs schließen?

    • FuchsFan
    • 21. August 2026 um 12:47
    Zitat von 2002Andreas

    Sieht hier im Nightly so aus:

    Ich hab mal KI bemüht.

    JavaScript
    (function () {
        if (!window.gBrowser)
            return;
    
        const tabContextMenu = document.getElementById("tabContextMenu");
    
        if (!tabContextMenu)
            return;
    
        // ------------------------------------------------------------
        // 1. "Mehrere Tabs schließen" komplett ausblenden
        // ------------------------------------------------------------
    
        const closeOptions = document.getElementById("context_closeTabOptions");
    
        if (closeOptions) {
            closeOptions.hidden = true;
            closeOptions.setAttribute("hidden", "true");
            closeOptions.style.display = "none";
        }
    
        // ------------------------------------------------------------
        // 2. Die drei Einträge aus dem Untermenü holen
        // ------------------------------------------------------------
    
        const closeStart = document.getElementById("context_closeTabsToTheStart");
        const closeEnd = document.getElementById("context_closeTabsToTheEnd");
        const closeOther = document.getElementById("context_closeOtherTabs");
    
        // ------------------------------------------------------------
        // 3. Eigenen Eintrag "Linke Tabs schließen" nicht mehr
        //    zusätzlich erzeugen, da Firefox ihn bereits besitzt.
        // ------------------------------------------------------------
    
        // Wir verwenden die vorhandenen Firefox-Menüeinträge.
        // Dadurch bleiben deren originale Befehle und Aktualisierungen erhalten.
    
        // ------------------------------------------------------------
        // 4. Alle drei wirklich an den Anfang des Menüs verschieben
        // ------------------------------------------------------------
    
        // Wichtig:
        // insertBefore(..., firstChild) funktioniert hier nicht zuverlässig,
        // wenn mehrere Elemente nacheinander verschoben werden.
        //
        // Deshalb immer wieder den jeweils aktuellen ersten sichtbaren
        // Menüpunkt holen.
    
        function moveToTop(element) {
            if (!element)
                return;
    
            const first = tabContextMenu.firstElementChild;
    
            if (first !== element)
                tabContextMenu.insertBefore(element, first);
        }
    
        // Reihenfolge am Ende:
        // Linke Tabs schließen
        // Rechte Tabs schließen
        // Andere Tabs schließen
        moveToTop(closeOther);
        moveToTop(closeEnd);
        moveToTop(closeStart);
    
        // ------------------------------------------------------------
        // 5. Falls Firefox das Menü beim Öffnen wieder aktualisiert,
        //    erneut anwenden.
        // ------------------------------------------------------------
    
        if (!tabContextMenu._closeTabsCustomHandler) {
            tabContextMenu._closeTabsCustomHandler = true;
    
            tabContextMenu.addEventListener("popupshowing", () => {
                const closeOptions =
                    document.getElementById("context_closeTabOptions");
    
                if (closeOptions) {
                    closeOptions.hidden = true;
                    closeOptions.setAttribute("hidden", "true");
                    closeOptions.style.display = "none";
                }
    
                const closeStart =
                    document.getElementById("context_closeTabsToTheStart");
    
                const closeEnd =
                    document.getElementById("context_closeTabsToTheEnd");
    
                const closeOther =
                    document.getElementById("context_closeOtherTabs");
    
                moveToTop(closeOther);
                moveToTop(closeEnd);
                moveToTop(closeStart);
            });
        }
    })();
    Alles anzeigen
  • Andere Tabs schließen?

    • FuchsFan
    • 21. August 2026 um 10:33

    Mitleser

    Weil dein Script vom Aufbau her mein Interesse geweckt hat, so habe ich es in Nightly 156 getestet, aber es verweigert seinen Dienst. Es wird nichts angezeigt, nur #context_closeTabOptions wirkt. Order auch geändert, trotzdem nicht. Deshalb habe ich "Keine Intelligenz" gefragt, und das kam als Antwort:

    Hast du eine andere Idee, um die Einfachheit beizubehalten?

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 21. August 2026 um 09:39
    Zitat von 2002Andreas

    Linke Tabs schließen ist jetzt nicht mehr ausgegraut, wenn es keinen linken Tab gibt wie im Screenshot zu sehen ist. Dort sind nur 2 rechte Tabs.

    Ist geändert.:) Danke für den Hinweis.

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 21. August 2026 um 09:17
    Zitat von 2002Andreas

    Eben in einem meiner Nightlys:

    Guten Morgen, Andreas!:)

    Habe es gefunden, schon mit Fox 88 hatte ich das in der userChrome.css zu stehen, und so bei allen übernommen.;)

    Wenn du das Script für Linke Tabs schließen meintest, da ist es jetzt mit eingearbeitet, das der Eintrag versteckt wird.

    JavaScript
    (function() {
      if (location.href !== 'chrome://browser/content/browser.xhtml')
        return;
    
      // --- Mehrere Tabs schließen mit CSS aus Kontext-Tabs versteckt -------------
      const style = document.createElement('style');
      style.textContent = '#context_closeTabOptions { display: none !important; }';
      document.documentElement.appendChild(style);
      // ---------------------------------------------------------------------------
    
      const tabContextMenu = document.getElementById('tabContextMenu');
      const refItem = document.getElementById('context_undoCloseTab');
    
      if (!tabContextMenu || !refItem)
        return;
    
      // Bereits vorhanden?
      if (document.getElementById('context_closeLeftTabs'))
        return;
    
      const menuitem = document.createXULElement('menuitem');
    
      menuitem.id = 'context_closeLeftTabs';
      menuitem.setAttribute('label', 'Linke Tabs schließen');
      // Default: deaktiviert bis wir prüfen
      menuitem.disabled = true;
    
      tabContextMenu.insertBefore(menuitem, refItem);
    
      // Vor dem Anzeigen prüfen und ggf. ausgrauen
      tabContextMenu.addEventListener('popupshowing', () => {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab) {
          menuitem.disabled = true;
          return;
        }
    
        const index = gBrowser.tabs.indexOf(contextTab);
        // Wenn Index <= 0 gibt es keine linken Tabs -> ausgegraut
        menuitem.disabled = index <= 0;
      });
    
      menuitem.addEventListener('command', () => {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const index = gBrowser.tabs.indexOf(contextTab);
    
        if (index <= 0)
          return;
    
        // Tabs links vom Kontext-Tab ermitteln.
        // Kopie verwenden, da sich gBrowser.tabs beim Schließen verändert.
        const tabs = Array.from(gBrowser.tabs).slice(0, index);
    
        for (const tab of tabs) {
          if (!tab.closing)
            gBrowser.removeTab(tab, {
              animate: false
            });
        }
      });
    })();
    Alles anzeigen

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 20. August 2026 um 22:26
    Zitat von 2002Andreas

    Ich nutze ein noch anderes Skript, aber auch da musste ich das per extra CSS entfernen.

    Nun habe ich schon einige Füchse durchstöbert, keiner hat den Eintrag mehr. Ein unbefleckter, da ist er vorhanden. Muss morgen mal einen intensiv durchforsten, eventuell ist ja auch ein Script daran beteiligt. Wenn ich das gefunden habe, dann kümmere ich mich mal um deinen Vorschlag. Gute Nacht!:)

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 20. August 2026 um 22:09
    Zitat von 2002Andreas

    Perfekt fände ich es, wenn dieser Eintrag dann automatisch ausgeblendet wird gleich im Skript:

    Hmmm, habe ich im Kontext nicht mehr. Da muss ich erst einmal auf Pirsch gehen, wo ich das abgestellt habe.;)

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 20. August 2026 um 21:48

    Endor

    Ja, da habe ich aus Versehen ein Testscript eingefügt, ist in #4 ausgetauscht. Danke für den Hinweis.

    Zitat von Endor

    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.

    Auch dafür sage ich danke, gut zu wissen.:thumbup:

  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 20. August 2026 um 20:02

    Und noch eine Version zur Auswahl, mit drei Einträgen.

    JavaScript
    // ==UserScript==
    // @name            KontextCloseTabs.uc.js
    // @description     TabContextMenu = Linke, Rechte und Alle Tabs schließen
    //                  Alle Tabs schließen mit Warnhinweis 
    // @compatibility   Firefox 154+
    // @include         main
    // @charset         UTF-8
    // @version         2026.08.20
    // ==/UserScript==
    
    (function () {
      "use strict";
    
      if (location.href !== "chrome://browser/content/browser.xhtml")
        return;
    
      const tabContextMenu = document.getElementById("tabContextMenu");
      const undoCloseTab = document.getElementById("context_undoCloseTab");
    
      if (!tabContextMenu || !undoCloseTab)
        return;
    
      // ------------------------------------------------------------
      // Menüpunkt erzeugen (XUL)
      // ------------------------------------------------------------
    
      function createMenuItem(id, label) {
        let item = document.getElementById(id);
    
        if (!item) {
          item = document.createXULElement("menuitem");
          item.id = id;
          item.setAttribute("label", label);
          // role/class kann helfen, dass das Item korrekt dargestellt wird
          item.className = "menuitem";
        }
    
        return item;
      }
    
      // ------------------------------------------------------------
      // Linke Tabs schließen
      // ------------------------------------------------------------
    
      const closeLeft = createMenuItem(
        "context_closeLeftTabs",
        "Linke Tabs schließen"
      );
    
      closeLeft.addEventListener("command", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const tabs = Array.from(gBrowser.tabs);
    
        for (const tab of tabs) {
          if (tab === contextTab)
            break;
    
          if (!tab.pinned)
            gBrowser.removeTab(tab, { animate: true });
        }
      });
    
      // ------------------------------------------------------------
      // Rechte Tabs schließen
      // ------------------------------------------------------------
    
      const closeRight = createMenuItem(
        "context_closeRightTabs",
        "Rechte Tabs schließen"
      );
    
      closeRight.addEventListener("command", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const tabs = Array.from(gBrowser.tabs);
        const index = tabs.indexOf(contextTab);
    
        if (index === -1)
          return;
    
        for (let i = tabs.length - 1; i > index; i--) {
          const tab = tabs[i];
    
          if (!tab.pinned)
            gBrowser.removeTab(tab, { animate: true });
        }
      });
    
      // ------------------------------------------------------------
      // Alle Tabs schließen (mit Bestätigung)
      // ------------------------------------------------------------
    
      const closeAll = createMenuItem(
        "context_closeAllTabsCustom",
        "Alle Tabs schließen…"
      );
    
      closeAll.addEventListener("command", function () {
        // Bestätigung (einfacher confirm)
        const msg = "Wirklich alle Tabs schließen? Diese Aktion kann nicht rückgängig gemacht werden.";
        if (!confirm(msg))
          return;
    
        const tabs = Array.from(gBrowser.tabs);
    
        // Schließe alle nicht-gepinnten Tabs von rechts nach links
        for (let i = tabs.length - 1; i >= 0; i--) {
          const tab = tabs[i];
          if (!tab.pinned) {
            try {
              gBrowser.removeTab(tab, { animate: true });
            } catch (e) {
              // ignore
            }
          }
        }
      });
    
      // ------------------------------------------------------------
      // Menü einfügen
      // ------------------------------------------------------------
    
      // Falls Items bereits existieren, werden sie wiederverwendet; sonst eingefügt
      tabContextMenu.insertBefore(closeLeft, undoCloseTab);
      tabContextMenu.insertBefore(closeRight, undoCloseTab);
      tabContextMenu.insertBefore(closeAll, undoCloseTab);
    
      // ------------------------------------------------------------
      // Menü beim Öffnen aktualisieren (aktiv/disabled)
      // ------------------------------------------------------------
    
      tabContextMenu.addEventListener("popupshowing", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab) {
          // Wenn kein Kontext-Tab, die Einträge verstecken (sicherer)
          closeLeft.hidden = true;
          closeRight.hidden = true;
          closeAll.hidden = true;
          return;
        }
    
        closeLeft.hidden = false;
        closeRight.hidden = false;
        closeAll.hidden = false;
    
        const tabs = Array.from(gBrowser.tabs);
        const index = tabs.indexOf(contextTab);
    
        if (index === -1)
          return;
    
        let hasLeft = false;
        let hasRight = false;
        let hasAnyCloseable = false;
    
        for (let i = 0; i < tabs.length; i++) {
          const tab = tabs[i];
    
          if (tab.pinned)
            continue;
    
          if (i < index)
            hasLeft = true;
    
          if (i > index)
            hasRight = true;
    
          hasAnyCloseable = true;
        }
    
        closeLeft.disabled = !hasLeft;
        closeRight.disabled = !hasRight;
        // closeAll ist aktiviert, wenn es mindestens einen schließbaren Tab gibt
        closeAll.disabled = !hasAnyCloseable;
      });
    
    })();
    Alles anzeigen
  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 20. August 2026 um 19:07
    Zitat von 2002Andreas

    Das hat KI dazu gesagt

    Und das auch noch (für linke Tabs).;)

    JavaScript
    (function() {
      if (location.href !== 'chrome://browser/content/browser.xhtml')
        return;
    
      const tabContextMenu = document.getElementById('tabContextMenu');
      const refItem = document.getElementById('context_undoCloseTab');
    
      if (!tabContextMenu || !refItem)
        return;
    
      // Nicht doppelt einfügen
      if (document.getElementById('context_closeLeftTabs'))
        return;
    
      const menuitem = document.createXULElement('menuitem');
      menuitem.id = 'context_closeLeftTabs';
      menuitem.setAttribute('label', 'Linke Tabs schließen');
    
      tabContextMenu.insertBefore(menuitem, refItem);
    
      menuitem.addEventListener('command', function() {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const pos = gBrowser.tabs.indexOf(contextTab);
    
        if (pos <= 0)
          return;
    
        // Kopie erstellen, damit das Entfernen die Iteration nicht beeinflusst
        const tabsToClose = Array.from(gBrowser.tabs).slice(0, pos);
    
        for (const tab of tabsToClose) {
          if (!tab.closing)
            gBrowser.removeTab(tab, { animate: false });
        }
      });
    })();
    Alles anzeigen
  • close-tabs-left.uc.js funktioniert seit Firefox 154 nicht mehr

    • FuchsFan
    • 20. August 2026 um 18:47

    Ich kann dir das anbieten, die vier Einträge werden damit abgedeckt.

    JavaScript
    (function () {
      "use strict";
    
      if (location.href !== "chrome://browser/content/browser.xhtml")
        return;
    
      const tabContextMenu = document.getElementById("tabContextMenu");
      const undoCloseTab = document.getElementById("context_undoCloseTab");
    
      if (!tabContextMenu || !undoCloseTab)
        return;
    
    
      // ------------------------------------------------------------
      // Menüpunkt erzeugen
      // ------------------------------------------------------------
    
      function createMenuItem(id, label) {
        let item = document.getElementById(id);
    
        if (!item) {
          item = document.createXULElement("menuitem");
          item.id = id;
          item.setAttribute("label", label);
        }
    
        return item;
      }
    
    
      // ------------------------------------------------------------
      // Linke Tabs schließen
      // ------------------------------------------------------------
    
      const closeLeft = createMenuItem(
        "context_closeLeftTabs",
        "Linke Tabs schließen"
      );
    
      closeLeft.addEventListener("command", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const tabs = Array.from(gBrowser.tabs);
    
        for (const tab of tabs) {
          if (tab === contextTab)
            break;
    
          if (!tab.pinned)
            gBrowser.removeTab(tab, { animate: true });
        }
      });
    
    
      // ------------------------------------------------------------
      // Rechte Tabs schließen
      // ------------------------------------------------------------
    
      const closeRight = createMenuItem(
        "context_closeRightTabs",
        "Rechte Tabs schließen"
      );
    
      closeRight.addEventListener("command", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const tabs = Array.from(gBrowser.tabs);
        const index = tabs.indexOf(contextTab);
    
        if (index === -1)
          return;
    
        for (let i = tabs.length - 1; i > index; i--) {
          const tab = tabs[i];
    
          if (!tab.pinned)
            gBrowser.removeTab(tab, { animate: true });
        }
      });
    
    
      // ------------------------------------------------------------
      // Andere Tabs schließen
      // ------------------------------------------------------------
    
      const closeOthers = createMenuItem(
        "context_closeOtherTabsCustom",
        "Andere Tabs schließen"
      );
    
      closeOthers.addEventListener("command", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const tabs = Array.from(gBrowser.tabs);
    
        for (const tab of tabs) {
          if (tab !== contextTab && !tab.pinned)
            gBrowser.removeTab(tab, { animate: true });
        }
      });
    
    
      // ------------------------------------------------------------
      // Menü einfügen
      // ------------------------------------------------------------
    
      tabContextMenu.insertBefore(closeLeft, undoCloseTab);
      tabContextMenu.insertBefore(closeRight, undoCloseTab);
      tabContextMenu.insertBefore(closeOthers, undoCloseTab);
    
    
      // ------------------------------------------------------------
      // Menü beim Öffnen aktualisieren
      // ------------------------------------------------------------
    
      tabContextMenu.addEventListener("popupshowing", function () {
        const contextTab = TabContextMenu.contextTab;
    
        if (!contextTab)
          return;
    
        const tabs = Array.from(gBrowser.tabs);
        const index = tabs.indexOf(contextTab);
    
        if (index === -1)
          return;
    
        let hasLeft = false;
        let hasRight = false;
        let hasOther = false;
    
        for (let i = 0; i < tabs.length; i++) {
          const tab = tabs[i];
    
          if (tab.pinned)
            continue;
    
          if (i < index)
            hasLeft = true;
    
          if (i > index)
            hasRight = true;
    
          if (tab !== contextTab)
            hasOther = true;
        }
    
        closeLeft.disabled = !hasLeft;
        closeRight.disabled = !hasRight;
        closeOthers.disabled = !hasOther;
      });
    
    })();
    Alles anzeigen
  • bookmark_count.uc.js funktioniert im Nightly nicht mehr.

    • FuchsFan
    • 20. August 2026 um 13:50
    Zitat von Endor

    Prima. passt nun.
    Vielen Dank.

    Endor Sehr schön, ist gern geschehen, aber nur mit Hilfe KI.:/

  • bookmark_count.uc.js funktioniert im Nightly nicht mehr.

    • FuchsFan
    • 20. August 2026 um 12:58
    Zitat von Endor

    ließe sich das eventuell auch nur auf Menüleiste - Lesezeichen Popup beschränken?

    Endor

    In Zeile 16 und 17 beides getrennt einstellbar, bitte testen.

    JavaScript
    // ==UserScript==
    // @name            BMMultiColumn.uc.js
    // @description     Lesezeichenmenü automatisch in Spalten anzeigen (mit manueller Breiteneinstellung für Menü- und Toolbar-Items).
    // @author          Ryan, ding, angepasst für manuelle Breite
    // @include         main
    // @charset         UTF-8
    // @version         2026.08.20
    // @compatibility   Firefox 153
    // @async
    // @shutdown        window.BMMultiColumn.destroy();
    // @homepageURL     https://github.com/benzBrake/FirefoxCustomize/blob/master/userChromeJS
    // @note            2026.08.20 Manuelle Breiteneinstellung für Menü- und Toolbar-Items hinzugefügt
    // ==/UserScript==
    
    // --- BENUTZEREINSTELLUNG: Hier die gewünschte Breite für Menü- und Toolbar-Items in Pixel eintragen ---
    const USER_MENU_ITEM_WIDTH = 400;   // Breite für Menü-Popups (Lesezeichen, Chronik)
    const USER_TOOLBAR_ITEM_WIDTH = 300; // Breite für Toolbar-Popups (Lesezeichenordner in der Personal-Toolbar)
    
    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;
                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");
    
                event.originalTarget.on_DOMMenuItemActive = function(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",
                        width: "unset",
                        scrollSnapType: "x mandatory",
                    });
                    arrowscrollbox.style.width = "auto";
                    arrowscrollbox.style.maxHeight = "calc(100vh - 129px)";
                    let slot = scrollbox.querySelector('slot');
                    slot.style.display = "contents";
    
                    // --- MANUELLE BREITE: Unterschiedliche Breite für Menü- und Toolbar-Popups ---
                    let columnWidth;
                    let isToolbarPopup = false;
    
                    // Prüfe, ob das Popup in der Personal-Toolbar liegt
                    let parent = menupopup.parentNode;
                    while (parent) {
                        if (parent.id === "PlacesToolbar" || parent.id === "BMB_bookmarksPopup" || parent.id === "PersonalToolbar") {
                            isToolbarPopup = true;
                            break;
                        }
                        parent = parent.parentNode;
                    }
    
                    columnWidth = isToolbarPopup ? USER_TOOLBAR_ITEM_WIDTH : USER_MENU_ITEM_WIDTH;
    
                    let maxWidth = calcWidth(-129);
                    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 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
  • bookmark_count.uc.js funktioniert im Nightly nicht mehr.

    • FuchsFan
    • 20. August 2026 um 10:27

    Eine andere Möglichkeit wäre die Einstellung der Breite direkt im Script, was in Zeile 16 (eingestellt sind 400px) erfolgen kann.

    Dann teste bitte mal:

    JavaScript
    // ==UserScript==
    // @name            BMMultiColumn.uc.js
    // @description     Lesezeichenmenü automatisch in Spalten anzeigen (mit manueller Breiteneinstellung für Items).
    // @author          Ryan, ding, angepasst für manuelle Breite
    // @include         main
    // @charset         UTF-8
    // @version         2026.08.20
    // @compatibility   Firefox 153
    // @async
    // @shutdown        window.BMMultiColumn.destroy();
    // @homepageURL     https://github.com/benzBrake/FirefoxCustomize/blob/master/userChromeJS
    // @note            2026.08.20 Manuelle Breiteneinstellung für Menü-Items hinzugefügt
    // ==/UserScript==
    
    // --- BENUTZEREINSTELLUNG: Hier die gewünschte Breite für alle Menü-Items in Pixel eintragen ---
    const USER_MENU_ITEM_WIDTH = 400; // Standard: 400px - einfach diesen Wert ändern!
    
    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;
                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");
    
                event.originalTarget.on_DOMMenuItemActive = function(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",
                        width: "unset",
                        scrollSnapType: "x mandatory",
                    });
                    arrowscrollbox.style.width = "auto";
                    arrowscrollbox.style.maxHeight = "calc(100vh - 129px)";
                    let slot = scrollbox.querySelector('slot');
                    slot.style.display = "contents";
    
                    // --- MANUELLE BREITE: Hier wird die eingestellte Breite verwendet ---
                    let columnWidth = USER_MENU_ITEM_WIDTH;
    
                    let maxWidth = calcWidth(-129);
                    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 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
  • bookmark_count.uc.js funktioniert im Nightly nicht mehr.

    • FuchsFan
    • 20. August 2026 um 10:10
    Zitat von Endor

    Sobald der Text des Ordners länger ist wird er überlagert.

    Das wird wohl nur funktionieren, wenn die Breite der Popup-Menüs angepasst wird. Bei mir kein Problem, weil das schon immer so war. Ich habe mal auszugsweise nur den Teil für die Bookmarks genommen, und ihn so angepasst, dass beide Scripte zusammen funktionieren. Teste es mal bei dir, wobei der Code aber auch für den Einsatz von Icons vorbereitet ist.

    CSS
    @-moz-document url(chrome://browser/content/browser.xhtml) {
    
    :root {
        --arrowpanel-border-radius: 0px !important;
    }
    
    :is(menupopup, panel)[type="arrow"] {
        --panel-border-radius: 0px !important;
    }
    
    /* Popup-Menüs (äußerer Rahmen) / außer Lesezeichen und Urlbar Suche */
    menupopup {
        appearance: none!important;	
    	background: #00d4ff !important;
        border: 3px solid 	#0070ff !important; /* Umrandung/Farbe */
        padding: 5px 5px 5px 5px !important; /* Ausrichtung */
        font-size: 9pt !important; /* Schriftgröße */
        border-radius: 0px !important;
    	--border-radius: 0px !important;	
    }
    
    /* Popup-Menüs (inneres Panel) / außer Lesezeichen */
    arrowscrollbox:not(#tabbrowser-arrowscrollbox), menupopup, popup {
        appearance: none!important;
        min-width: 400px !important; /* vorgegebene Breite der Popup-Fenster */
        --panel-background: #ffd700 !important;
        --panel-border-color: magenta !important;  
        --panel-border-radius: 0px !important;
        padding: 5px 5px 5px 5px !important;	
    } 
    arrowscrollbox:not(menupopup){
    	border-radius: 6px !important;
    }
    
    /* für alle Bookmark-Item */
    #PlacesToolbarItems toolbarbutton.bookmark-item menupopup.toolbar-menupopup menu.menu-iconic.bookmark-item,
    #PlacesToolbarItems toolbarbutton.bookmark-item menupopup.toolbar-menupopup menuitem.menuitem-iconic.bookmark-item,
    #bookmarksMenuPopup .menu-iconic.bookmark-item,
    #bookmarksMenuPopup menuitem {
        width: 100% !important;
        max-width: 400px !important;
        min-width: 0 !important;
        background-color: white !important;
        min-height: 24px;
        padding: 0 0 0 40px !important;
        margin: 0.5px !important;
        border-width: thin !important;
        border: 1px solid #a6a6a6;
        border-radius: 4px !important;
        background-repeat: no-repeat !important;
        background-position: 10px 3px;
        background-size: 15px 15px !important;
    }
    
    /* aktive Menüeinträge bei hover */
    menupopup :is(menu, menuitem):hover {
      background-color: #ccf5ff !important;
    }
    
    /* die inaktiven Menüeinträge bei hover grau */ 
    menupopup :is(menu[disabled="true"], menuitem[disabled="true"]):hover {
      background-color: #cccccc !important;
    }
    }
    Alles anzeigen

Unterstütze uns!

Jährlich (2026)

72,4 %

72,4% (560,79 von 775 EUR)

Jetzt spenden
  1. Kontakt
  2. Datenschutz
  3. Impressum
Community-Software: WoltLab Suite™
Mastodon