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. Mira_Belle

Beiträge von Mira_Belle

  • Suche_Automatisch_Leeren.uc.js funktioniert nicht mehr

    • Mira_Belle
    • 13. April 2025 um 20:19
    Zitat von Dharkness

    Hm, wie ist es mit Zeile 5, welche bei Dir Zeile 6 ist, Endung .jsm, .jsm gibt es doch nicht mehr, oder liege ich da falsch?

    Sorry, habe ich übersehen!

    Wenn Son Doku's Skript entsprechend geändert wird, sollte es auch wieder funktionieren.

    JavaScript
    /* Suchfeld_automatisch_leeren.us.js */
    
    (function() {
      const lazy = {};
      ChromeUtils.defineESModuleGetters(lazy, {   
      FormHistory: "resource://gre/modules/FormHistory.sys.mjs",
      });
      var searchbar = document.getElementById("searchbar");
      searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
        let textBox = this._textbox;
        if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && lazy.FormHistory.enabled) {
          lazy.FormHistory.update({
              op: "bump",
              fieldname: textBox.getAttribute("autocompletesearchparam"),
              value: aData,
          }, {
              handleError(aError) {
                Cu.reportError("Saving search to form history failed: " + aError.message);
              },
          });
        }
        let engine = aEngine || this.currentEngine;
        let submission = engine.getSubmission(aData, null, "searchbar");
        let telemetrySearchDetails = this.telemetrySearchDetails;
        this.telemetrySearchDetails = null;
        if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
          telemetrySearchDetails = null;
        }
        const details = {
          isOneOff: aOneOff,
          isSuggestion: (!aOneOff && telemetrySearchDetails),
          selection: telemetrySearchDetails,
        };
        let params = {
          postData: submission.postData,
        };
        if (aParams) {
          for (let key in aParams) {
            params[key] = aParams[key];
          }
        }
        openTrustedLinkIn(submission.uri.spec, "tab", params);
        this.value = '';    
        this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
      };
    }());
    Alles anzeigen

    Zitat von 2002Andreas

    Wenn du dann auf den kleinen Pfeil rechts klickst, dann wird der Inhalt vom Suchfenster gelöscht, während die Suche gestartet wird.

    Im ersten Skript wird der Text auch ohne gestartete Suche nach einer festgelegten Zeit gelöscht.

    Danke

  • Suche_Automatisch_Leeren.uc.js funktioniert nicht mehr

    • Mira_Belle
    • 13. April 2025 um 18:01

    Son Goku
    Es ist genau Dein Skript!
    Und da es nicht funktionierte UND das von Boerensfeger viel "länger" ist,
    habe ich die Vermutung, dass Dir irgendwann beim Kopieren
    oder was auch immer, wichtige Codezeilen verloren gegangen sind!
    Vergleiche Deinen Code doch noch einmal genau mit den Zeilen
    32 bis 54!
    Exakt gleich!
    Bis auf eine Zeile! Bei Dir "XPCOMUtils.defineLazyModuleGetters(lazy, {"
    im anderen Skript "ChromeUtils.defineESModuleGetters(lazy, {":!:

    Wenn Dein Skript, genauso wie Du es hier gepostet hast, einmal funktionierte,
    dann ist genau DAS der Fehler! Nicht XPCOMUtils., sondern ChromeUtils..

    Kannst es ja mal ausprobieren und wenn Du es tust, dann mal berichten. Danke.

  • Suche_Automatisch_Leeren.uc.js funktioniert nicht mehr

    • Mira_Belle
    • 13. April 2025 um 14:55
    JavaScript
    (function() {
        
        const lazy = {};
    
    XPCOMUtils.defineLazyModuleGetters(lazy, {
       FormHistory: "resource://gre/modules/FormHistory.jsm",
    });
    
       var searchbar = document.getElementById("searchbar");
       
       searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
       let textBox = this._textbox;
    
    
         if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && lazy.FormHistory.enabled) {
           lazy.FormHistory.update({
               op: "bump",
               fieldname: textBox.getAttribute("autocompletesearchparam"),
               value: aData,
           }, {
               handleError(aError) {
                 Cu.reportError("Saving search to form history failed: " + aError.message);
               },
           });
         }
    Alles anzeigen

    Eventuell ist es so besser zu lesen. ;)
    Und jetzt kann man mal schauen, wo es hakt.

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 12. April 2025 um 12:53

    Genau,

    security.browser_xhtml_csp.enabled

    Aber der steht auf true

    und

    security.browser_xhtml_csp.report-only

    hatte ich gar nicht angerührt! Steht auf false.

    Komisch, meine Version ist: 139.0a1 (2025-04-11) (64-Bit)


    Muss mich berichtigen!
    Funktioniert doch nicht ohne:!:

    Muss mal alle meine Skripte durchprobieren, ob es da irgendwo hakt.

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 12. April 2025 um 12:49

    Danke.

    :/ Merkwürdig.

    Funktioniert, mit und ohne!
    Aber halt, ich hatte da einen anderen Schalter, ....
    was war das noch mal??

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 12. April 2025 um 12:38

    :?:

    Hat jemand zufällig ein Skript, welches ohne diesen Schalter
    in der aktuellen Nightly nicht funktioniert?

  • Der Glückwunsch-Thread

    • Mira_Belle
    • 11. April 2025 um 08:58

    Auch von mir,
    alles Liebe und Gute.

  • Floorp Browser

    • Mira_Belle
    • 10. April 2025 um 09:03
    Zitat von Horstmann

    Falls du vom Fx CSS Reddit sub sprichst, es ist halt immer noch das einzige Forum mit vernünftigen und aktuellen CSS inhalten für Firefox.

    Echt?

    Das tut jetzt aber 2002Andreas in der Seele weh,
    und anderen "Helfern" tut das auch unrecht.

  • AddBookmark here Script arbeitet nicht in Nightly

    • Mira_Belle
    • 5. April 2025 um 16:02
    Zitat von Boersenfeger

    Aber ich bin jetzt grade verwirrt;

    Ich auch! Denn das von Dir beschriebene funktioniert auch im aktuellen Firefox (137.0)!
    Und in der Nightly ebenfalls.
    Das ganze ohne Erweiterung oder Skript!

  • stop-reload-button in 139

    • Mira_Belle
    • 5. April 2025 um 12:42
    Zitat von Sören Hentzschel

    Wieso sollte es den nicht mehr geben?

    Weil ich ganz vergaß, dass ich ein Skript zum Verschieben eben jenes Buttons am Laufen hatte.
    Nur, eben genau dieses Skript war, ist, kaputt und funktionierte eben nicht so richtig.
    Sorry

  • stop-reload-button in 139

    • Mira_Belle
    • 4. April 2025 um 20:49

    Ist jemandem schon mal aufgefallen, dass es den Stop-Reload-Button nicht mehr gibt?
    Ist im Browser so festgelegt!

    CSS
                    @-moz-document url-prefix('chrome://browser/content/browser.x') {
                        #stop-reload-button {
                            display: none;
                        }
                        #new-stop-reload-button {
                            display: flex !important;
                            order: 9999;
                        }
                        #new-stop-reload-button .urlbar-icon {
                            -moz-context-properties: fill, fill-opacity !important;
                            fill: currentColor !important;
                        }
                    }
    Alles anzeigen

    Wie kann man DAS reaktivieren?

  • Windows 11

    • Mira_Belle
    • 4. April 2025 um 17:54
    Zitat von Sören Hentzschel

    Ich würde meinen Computer niemals ohne Festplattenverschlüsselung nutzen (FileVault auf macOS, aber ist letztlich das Gleiche).

    Wenn man ein mobiles Gerät nutzt, oder wenn "Hinz und Kunz" an den Rechner kommt, mag das ja Sinn machen,
    aber bei einem lokalen PC?

    Also ich weiß nicht.
    Aber gut, kann jeder ja halten wie er will.

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 3. April 2025 um 16:07
    Zitat von 2002Andreas

    Hat sich dann evtl. erledigt, siehe bitte Beitrag Nr. 19.

    Wir werden sehen.
    Und ich war einer Lösung so nahe.

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 3. April 2025 um 15:43

    Verzeichnis:!:
    Mein Fehler, sorry.

    2002Andreas Ich denke, da fehlt dann noch etwas.
    Die Anweisung, was gemacht werden soll.
    Aber da bin ich gerade überfragt.

    Eventuell liegt die Antwort ja im originalen Skript.
    Muss ich mir mal anschauen.

  • Fehler in Skripten im Nightly

    • Mira_Belle
    • 3. April 2025 um 15:36

    Bitte teste mal.

    JavaScript
    // ==UserScript==
    // @name           newtabfromhistory.uc.js
    // @namespace      https://www.camp-firefox.de/forum/viewtopic.php?p=1090093#p1090093
    // @description    Links aus Chronik in neuem Tab öffnen
    // @author         aborix
    // @compatibility  139
    // @version        0.0.3b (CSP Fix)
    // ==/UserScript==
    
    (function() {
    
        if (location !== 'chrome://browser/content/browser.xhtml')
          return;
      
        PlacesUIUtils.openNodeWithEvent = function PUIU_openNodeWithEvent(aNode, aEvent) {
          let window = aEvent.target.ownerGlobal;
          let browserWindow = (window && window.document.documentElement.getAttribute('windowtype') === 'navigator:browser')
            ? window 
            : BrowserWindowTracker.getTopWindow();
          let where = window.BrowserUtils.whereToOpenLink(aEvent, false, true);
          
          if (this.loadBookmarksInTabs) {
            if (where === 'current' && !aNode.uri.startsWith('javascript:')) {
              where = 'tab';
            }
            if (where === 'tab' && browserWindow.gBrowser.selectedTab.isEmpty) {
              where = 'current';
            }
          }
          
          this._openNodeIn(aNode, where, window);
        };
        
        let onPopupshowing = function(event) {
          let historyMenu = document.getElementById('history-menu');
          if (!historyMenu._placesView) {
            new HistoryMenu(event);
            historyMenu._placesView._onCommand = function HM__onCommand(aEvent) {
              let placesNode = aEvent.target._placesNode;
              if (placesNode) {
                PlacesUIUtils.openNodeWithEvent(placesNode, aEvent);
              }
            };
          }
        };
      
        let historyPopup = document.getElementById('historyMenuPopup');
        if (historyPopup) {
          historyPopup.addEventListener('popupshowing', onPopupshowing);
        }
      
      })();
    Alles anzeigen

    Und

    JavaScript
    // ==UserScript==
    // @name           patchForBug1904014_allow_search_oneoff_with_empty_text.uc.js
    // @description    undoing Bug 1904014 - Remove function to do an empty search using the search bar one-off buttons.
    // @include        chrome://browser/content/browser.xhtml
    // @compatibility  139
    // @version        2024/07/14 fix add search engine button
    // @version        2024/07/8
    // ==/UserScript==
    (function() {
        if (location.href !== "chrome://browser/content/browser.xhtml") return;
        
        let original_on_click = SearchOneOffs.prototype._on_click;
        SearchOneOffs.prototype._on_click = function(event) {
            if (false) {
                return;
            }
            return original_on_click.apply(this, arguments);
        };
        
        let original_on_command = SearchOneOffs.prototype._on_command;
        SearchOneOffs.prototype._on_command = function(event) {
            if (false) {
                return;
            }
            if (event.target.classList.contains("searchbar-engine-one-off-add-engine")) {
                const lazy = {};
                ChromeUtils.defineESModuleGetters(lazy, {
                    SearchUIUtils: "resource:///modules/SearchUIUtils.sys.mjs",
                });
            }
            return original_on_command.apply(this, arguments);
        };
        
        let PSAC = document.getElementById("PopupSearchAutoComplete");
        
        PSAC.addEventListener("click", event => { 
            if (event.button == 2) {
                return; // Ignore right clicks.
            }
            let button = event.originalTarget.closest(".searchbar-engine-one-off-add-engine");
            if (button) {
                return;
            }
            button = event.originalTarget.closest(".search-panel-header");
            if (!button) {
                return;
            }
            if (!document.getElementById("searchbar").value) {
                BrowserSearch.searchBar.handleSearchCommand(event, Services.search.defaultEngine);
            }
        });
        
        PSAC.addEventListener("keydown", event => { 
            if (event.keyCode !== KeyEvent.DOM_VK_RETURN) {
                return;
            }
            let button = event.originalTarget.closest(".search-panel-header");
            if (!button) {
                return;
            }
            if (!document.getElementById("searchbar").value) {
                BrowserSearch.searchBar.handleSearchCommand(event, Services.search.defaultEngine);
            }
        });
    })();
    Alles anzeigen
  • Fehler in Skripten im Nightly

    • Mira_Belle
    • 3. April 2025 um 14:45

    ?
    Heißt bei Dir das erste Skript nicht newtabfromhistory.uc.js sondern Neuer Tab aus Chronik.uc.js
    und
    das zweite Skript nicht patchForBug1904014_allow_search_oneoff_with_empty_text.uc.js
    sondern search_oneoff_with_empty_text.uc.js?

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 3. April 2025 um 14:38
    Zitat von 2002Andreas

    Kannst du das Skript dann bitte mal zwecks Test hier posten?

    Aber klar doch!
    Habe so gut ich konnte die Änderungen dokumentiert.
    Will es ja selber nachvollziehen können.

    CSS
    // ==UserScript==
    // @name           Appmenu.uc.js
    // @namespace      Appmenu@gmail.com
    // @description    Basiert auf dem Script externalFuncButtonM.uc.js, Wiederherstellung der Orangenen FF-Menü Schaltfläche
    // @include        main
    // @version        update for Firefox 68+ by aborix
    // @author         defpt
    // @charset        UTF-8
    // @version        2019.08.04
    // @version        2020.05.27
    // @version        2020.07.13 Weitere Menüs und Funktionen ergänzt by bege
    // @version        2024.08.10 alle Einstellungen im Abschnitt Konfiguration vornehmen
    // @version        2024.08.18 einige Veränderungen am Skript, Symbole, Funktionen & Menüs by Mira Bellenbaum
    // @version        2025.01.15 EventListener korrigiert und angepasst, by Mira Bellenbaum
    // @version        2025.04.03 Zeile 340 "eval()" ersetzt. Nachfolgend Zeilen 381-416 ergänzt und Parameter (command:) angepasst
    // ==/UserScript==
    
      // Definiere den Profilpfad
      let ProfilePath = PathUtils.toFileURI(
        PathUtils.join(PathUtils.profileDir, "chrome", "icons")
      );
      
      var Appmenu = {
        // Beginn der Konfiguration ------------------
      
        // Editor mit angegebenem Pfad verwenden
        // editor: 'C:\\Program Files\\Notepad++\\notepad++.exe',
        editor: "C:\\Program Files\\Microsoft VS Code\\Code.exe",
        // oder
        // in 'view_source.editor.path' eingetragenen Editor verwenden
        editor: Services.prefs.getCharPref("view_source.editor.path"),
        // Dateimanager mit angegebenem Pfad verwenden oder leer ('') wenn System-Dateimanager verwenden
        //fileManager: 'C:\\Program files\\FreeCommander XE\\FreeCommander.exe',
        fileManager: "",
        // Parameter für Dateimanager oder leer ('')
        //FMParameter: '/T',
        FMParameter: "",
        // Submenüs ohne Inhalt im Hauptmenü automatisch ausblenden
        autohideEmptySubDirs: true,
        // Submenüs im Hauptmenü nach unten verschieben
        moveSubDirstoBottom: false,
        // Ort und Aussehen des Menü-Buttons einstellen
        //   isUrlbar: 1,  // 0: TabsToolbar; 1: navbar,
        isUrlbar: 2, // 0: TabsToolbar; 1: navbar; 2: toolbar-menubar
        isButton: 0, // 0: Hamburger,klein; 1: Firefox,groß,
        // Hotkey zum Öffnen des Appmenüs oder leer ('')
        hotkey: "x",
        hotkeyModifier: "alt",
      
        // Ende der Konfiguration --------------------
      
        // Submenüs im Hauptmenü nach unten verschieben
        subdirPopupHash: [],
        subdirMenuHash: [],
      
        toolbar: {
          // Submenüs des Hauptmenüs definieren; Separator einfügen mit {name: 'separator'}
          subdirs: [
            {
              name: "Firefox Verzeichnisse",
              image: `${ProfilePath}/folder_currentColor.svg`, // Der Pfad wird direkt verwendet, ohne `url()`
            },
            {
              name: "Firefox Funktionen",
              image: `${ProfilePath}/settings_currentColor.svg`, // Der Pfad wird direkt verwendet, ohne `url()`
            },
            {
              name: "separator",
            },
          ],
          
          apps: [
    
            // Untermenü Firefox Verzeichnisse
            {
              name: 'Profil-Verzeichniss',
              id: "AMProfil",
              root: 'ProfD',
              path: '\\',
              subdir: 'Firefox Verzeichnisse',
            },
            {
              name: 'Chrome-Ordner',
              id: "AMchrome",
              root: 'ProfD',
              path: '\\chrome',
              subdir: 'Firefox Verzeichnisse',
            },
            {
              name: 'CSS-Ordner',
              id: "AMCSS",
              root: 'ProfD',
              path: '\\chrome\\css',
              subdir: 'Firefox Verzeichnisse',
            },
            {
              name: 'JS-Ordner',
              id: "AMJS",
              root: 'ProfD',
              path: '\\chrome\\scripts',
              subdir: 'Firefox Verzeichnisse',
            },
            {
              name: 'Addon-Verzeichniss',
              id: "AMAddons",
              root: 'ProfD',
              path: '\\extensions',
              subdir: 'Firefox Verzeichnisse',
             },
             {
              name: 'Programm-Verzeichniss',
              id: "AMProgramm",
              root: 'CurProcD',
              path: '\\',
              subdir: 'Firefox Verzeichnisse',
             },
             {
              name: 'Startup-Cache',
              id: "AMCache",
              root: 'ProfLD',
              path: '\\startupCache',
              subdir: 'Firefox Verzeichnisse',
            },
          ],
          
           configs: [
            // Untermenü Firefox Funktionen
            {
              name: 'Anpassen',
              id: "AMAnpassen",
              command: "gCustomizeMode.enter()",
              subdir: 'Firefox Funktionen',
            },
            {
              name: "Neustart im abgesicherten Modus",
              id: "AMModus",
              command: "safeModeRestart();",
              subdir: "Firefox Funktionen",
            },
            {
              name: "Browser-Konsole",
              id: "AMKonsole",
              command: "goKonsole",
    //            "var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});\
    //              var { BrowserConsoleManager } = require('resource://devtools/client/webconsole/browser-console-manager');\
    //              BrowserConsoleManager.openBrowserConsoleOrFocus();",
              subdir: "Firefox Funktionen",
            },
            {
              name: "Browser-Werkzeuge",
              id: "AMWerkzeuge",
              command: "goWerkzeuge",
    //            "var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});\
    //              var { BrowserToolboxLauncher } = require('resource://devtools/client/framework/browser-toolbox/Launcher.sys.mjs');\
    //              BrowserToolboxLauncher.init();",
              subdir: "Firefox Funktionen",
            },
            {
              name: "Web-Entwickler",
              id: "AMEntwickler",
              command: "goEntwickler",
    //            "var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});\
    //              var { gDevToolsBrowser } = require('resource://devtools/client/framework/devtools-browser');\
    //              gDevToolsBrowser.toggleToolboxCommand(window.gBrowser, Cu.now());",
              subdir: "Firefox Funktionen",
            },
            {
              name: "Firefox synchronisieren",
              id: "AMsynchron",
              command: "gSync",
    //          command: "gSync.openPrefs('menubar');",
              subdir: "Firefox Funktionen",
            },
            {
            name: "Zugangsdaten und Passwörter",
            id: "AMdaten",
            command:
              "LoginHelper.openPasswordManager(window, { entryPoint: 'mainmenu' })",
            tooltiptext: "about:logins",
            subdir: "Firefox Funktionen",
            },
            {
              name: "Task Manager",
              id: "AMManager",
              command: "switchToTabHavingURI('about:processes', true)",
              tooltiptext: "about:processes",
              subdir: "Firefox Funktionen",
            },
            {
              name: "Offline arbeiten",
              id: "AMOffline",
              command: "BrowserOffline.toggleOfflineStatus();",
              subdir: "Firefox Funktionen",
            },
              /*
                {
                name: 'separator',
                },
                */
            {
              name: 'Neustart',
              id: 'AMreboot',
              tooltiptext: 'userChrome.js-Cache wird geleert',
              command: "goReeboot",
    //          "Services.appinfo.invalidateCachesOnRestart(); \
    //                Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);",
            },
            {
              name: 'Beenden',
              id: 'AMquit',
              command: "goQuitApplication(event);",
            },
        ]
      },
    
      _externalAppPopup: null,
      _isready: false,
    
      init: function() {
        this.handleRelativePath(this.toolbar.apps);
        const XULNS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
    
        var ExternalAppBtn = document.createElementNS(XULNS, 'toolbarbutton');
        ExternalAppBtn.id = "AppMenuButton";
        ExternalAppBtn.setAttribute("label", "AppButton");
        //ExternalAppBtn.setAttribute("onclick", "event.preventDefault();event.stopPropagation();");
        ExternalAppBtn.addEventListener('click', event => {
          event.preventDefault();
          event.stopPropagation();
        });
        ExternalAppBtn.setAttribute("tooltiptext", "Firefox Menü");
        ExternalAppBtn.setAttribute("type", "menu");
        ExternalAppBtn.setAttribute("removable", "true");
          
        // Definiere den Profilpfad
        let ProfilePath = PathUtils.toFileURI(
          PathUtils.join(PathUtils.profileDir, "chrome", "image")
        );
      
        // Symbole
        let DefaultIcon = "Button_groß.png";
        let AlternateIcon = "Button_klein-plus.png";
    
    
        if (Appmenu.isButton) {
          ExternalAppBtn.style.listStyleImage = `url('${ProfilePath}/${DefaultIcon}')`; // Großes Symbol
          ExternalAppBtn.style.width = "94px"; // Feste Breite für großes Symbol
          ExternalAppBtn.style.height = "24px"; // Feste Höhe für großes Symbol
        } else {
          ExternalAppBtn.style.listStyleImage = `url('${ProfilePath}/${AlternateIcon}')`; // Kleines Symbol
          ExternalAppBtn.style.width = "16px"; // Feste Breite für kleines Symbol
          ExternalAppBtn.style.height = "21px"; // Feste Höhe für kleines Symbol
        }
          
        if (Appmenu.isUrlbar === 1) {
          var navBar = document.getElementById("nav-bar-customization-target");
          navBar.insertBefore(ExternalAppBtn, navBar.firstChild);
        } else if (Appmenu.isUrlbar === 2) {
          var menubar = document.getElementById("toolbar-menubar");
          menubar.insertBefore(ExternalAppBtn, menubar.firstChild);
        } else {
          var TabsToolbar = document.getElementById("TabsToolbar");
          TabsToolbar.insertBefore(ExternalAppBtn, TabsToolbar.firstChild);
        }
    
        var ExternalAppPopup = document.createElementNS(XULNS, 'menupopup');
        //ExternalAppPopup.setAttribute('onpopupshowing', 'event.stopPropagation(); Appmenu.onpopupshowing();');
        ExternalAppPopup.addEventListener('click', event => {
          event.stopPropagation();
        });
        ExternalAppPopup.setAttribute('id', 'AMpopup');
        this._externalAppPopup = ExternalAppPopup;
        ExternalAppBtn.appendChild(ExternalAppPopup);
        Appmenu.onpopupshowing();
          
        // Menü mit Tastaturkürzel öffnen
        if (Appmenu.hotkey) {
        let key = document.createXULElement('key');
          key.id = 'key_AppMenuPopup';
          key.setAttribute('key', Appmenu.hotkey);
          if (Appmenu.hotkeyModifier)
          key.setAttribute('modifiers', Appmenu.hotkeyModifier);
          key.setAttribute('oncommand', 'document.getElementById("AMpopup").openPopup();');
          document.getElementById('mainKeyset').appendChild(key);
        }
      },
    
      onpopupshowing: function() {
        if (this._isready) return;
        if (this._externalAppPopup === null) return;
        var ExternalAppPopup = this._externalAppPopup;
    
        for (let subdir of this.toolbar.subdirs) {
          if (subdir.name == 'separator') {
            ExternalAppPopup.appendChild(document.createXULElement('menuseparator'));
          } else {
            var subdirItem = ExternalAppPopup.appendChild(document.createXULElement('menu'));
            var subdirItemPopup = subdirItem.appendChild(document.createXULElement('menupopup'));
            subdirItem.setAttribute('class', 'menu-iconic');
            subdirItem.setAttribute('label', subdir.name);
            subdirItem.setAttribute('image', subdir.image);
            Appmenu.subdirPopupHash[subdir.name] = subdirItemPopup;
            Appmenu.subdirMenuHash[subdir.name] = subdirItem;
          }
        }
    
        for (let app of this.toolbar.apps) {
          var appItem;
          if (app.name == 'separator') {
            appItem = document.createXULElement('menuseparator');
          } else {
            appItem = document.createXULElement('menuitem');
            appItem.setAttribute('class', 'menuitem-iconic');
            appItem.setAttribute('label', app.name);
            appItem.setAttribute('image', app.image);
            //appItem.setAttribute('oncommand', "Appmenu.exec(this.path, this.args);");
            appItem.addEventListener('command', function () {
              Appmenu.exec(this.path, this.args);
              });
            appItem.setAttribute('tooltiptext', app.name);
            appItem.path = app.path;
            appItem.args = app.args;
          }
          if (app.subdir && Appmenu.subdirPopupHash[app.subdir])
            Appmenu.subdirPopupHash[app.subdir].appendChild(appItem);
          else ExternalAppPopup.appendChild(appItem);
        }
    
        for (let config of this.toolbar.configs) {
          var configItem;
          if (config.name == 'separator') {
            configItem = document.createXULElement('menuseparator');
          } else {
            configItem = ExternalAppPopup.appendChild(document.createXULElement('menuitem'));
            configItem.setAttribute('class', 'menuitem-iconic');
            configItem.setAttribute('label', config.name);
            configItem.setAttribute('image', config.image);
            //configItem.setAttribute('oncommand', config.command);
    //        configItem.addEventListener('command', () => {
    //          eval(config.command);
    //        });
    
            configItem.addEventListener('command', () => {
              Appmenu.executeCommand(config.command);
            });
    
            if (config.tooltiptext) {
              configItem.setAttribute('tooltiptext', config.tooltiptext);
            } else {
              configItem.setAttribute('tooltiptext', config.name);
            }
            configItem.setAttribute('id', config.id);
          }
              
          if (config.subdir && Appmenu.subdirPopupHash[config.subdir]) {
            Appmenu.subdirPopupHash[config.subdir].appendChild(configItem);
          } else {
            ExternalAppPopup.appendChild(configItem);
          }
        }
    
        if (this.autohideEmptySubDirs) {
          for (let i = 0; i < Appmenu.subdirPopupHash.length; i++) {
            if (Appmenu.subdirPopupHash[i].hasChildNodes()) {
              continue;
            } else {
              Appmenu.subdirMenuHash[i].setAttribute("hidden", "true");
            }
          }
        }
    
        if (this.moveSubDirstoBottom) {
          let i = ExternalAppPopup.childNodes.length;
          while (ExternalAppPopup.firstChild.getAttribute('class') != 'menuitem-iconic' && i-- != 0) {
            ExternalAppPopup.appendChild(ExternalAppPopup.firstChild);
          }
        }
        this._isready = true;
      },
    
      executeCommand: function(command) {
        const commandMap = { 
          "gCustomizeMode.enter()": () => gCustomizeMode.enter(),
          "safeModeRestart();": () => safeModeRestart(),
          "goKonsole": () => {
                  var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
                  var { BrowserConsoleManager } = require('resource://devtools/client/webconsole/browser-console-manager');
                  BrowserConsoleManager.openBrowserConsoleOrFocus();
                },
          "goWerkzeuge": () => {
                  var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
                  var { BrowserToolboxLauncher } = require('resource://devtools/client/framework/browser-toolbox/Launcher.sys.mjs');
                  BrowserToolboxLauncher.init();
                },
          "goEntwickler": () => {
                  var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
                  var { gDevToolsBrowser } = require('resource://devtools/client/framework/devtools-browser');
                  gDevToolsBrowser.toggleToolboxCommand(window.gBrowser, Cu.now());
                },
          "gSync": () => gSync.openPrefs('menubar'),
          "LoginHelper.openPasswordManager(window, { entryPoint: 'mainmenu' })": () => LoginHelper.openPasswordManager(window, { entryPoint: 'mainmenu' }),
          "switchToTabHavingURI('about:processes', true)": () => switchToTabHavingURI('about:processes', true),
          "BrowserOffline.toggleOfflineStatus();": () => BrowserOffline.toggleOfflineStatus(),      
          "goReeboot": () => {
                    Services.appinfo.invalidateCachesOnRestart();
                    Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
                  },
          "goQuitApplication(event);": () => goQuitApplication(event),
        };
        
        if (commandMap[command]) {
          commandMap[command]();
        } else {
          console.warn("Unbekannter Befehl: ", command);
        }
      },
    
      handleRelativePath: function(apps) {
        for (let app of apps) {
          if (app.path) {
            app.path = app.path.replace(/\//g, '\\');
            var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get(app.root, Ci.nsIFile).path;
            if (/^(\\)/.test(app.path)) {
              app.path = ffdir + app.path;
            }
          }
        }
      },
    
      exec: function(path, args) {
        args = args || [];
        var args_t = args.slice(0);
        for (let arg of args_t) {
          arg = arg.replace(/%u/g, gBrowser.currentURI.spec);
        }
        var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
        file.initWithPath(path);
        if (!file.exists()) {
          //Cu.reportError('Datei nicht gefunden: ' + path);
          alert('Datei nicht gefunden: ' + path);
          return;
        }
        if (file.isExecutable() && !path.endsWith('.js')) {
          var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
          process.init(file);
          process.run(false, args_t, args_t.length);
        } else if (file.isFile()) {
          if (this.editor) {
            let UI = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter);
            UI.charset = window.navigator.platform.toLowerCase().includes('win') ? 'Shift_JIS' : 'UTF-8';
            let path = UI.ConvertFromUnicode(file.path);
            let app = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
            app.initWithPath(this.editor);
            let process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
            process.init(app);
            process.run(false, [path], 1);
          } else {
            file.launch();
          }
        } else if (file.isDirectory()) {
          if (this.fileManager) {
            let args=[this.FMParameter,path];
            let app = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
            app.initWithPath(this.fileManager);
            let process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
            process.init(app);
            process.run(false, args, args.length);
          } else {
            file.launch();
          }
        }
      },
    };
    
    (function () {
        // Definiere den Profilpfad für die Symbole
        let ProfilePath = PathUtils.toFileURI(
          PathUtils.join(PathUtils.profileDir, "chrome", "icons")
        );
      
        // Standard-Symbol-Dateiname
        let ButtonIcon01 = "restart.svg";
        let ButtonIcon02 = "quit.svg";
      
        let Icon01 = "profile.svg";
        let Icon02 = "chrome.svg";
        let Icon03 = "css3.svg";
        let Icon04 = "js.svg";
        let Icon05 = "addons.svg";
        let Icon06 = "folder.svg";
        let Icon07 = "folder-1.svg";
      
        let Icon11 = "Themes.svg";
        let Icon12 = "debugging-workers.svg";
        let Icon13 = "command-console.svg";
        let Icon14 = "window-dev-tools.svg";
        let Icon15 = "developer.svg";
        let Icon16 = "sync.svg";
        let Icon17 = "passwords.svg";
        let Icon18 = "performance.svg";
        let Icon19 = "plug-disconnected.svg";
      
        // StyleSheetService zum Hinzufügen der CSS-Regeln
        let sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
        let uri = Services.io.newURI(
          "data:text/css;charset=utf-8," +
            encodeURIComponent(`
      
              menuitem[label="Profil-Verzeichniss"] { background-image: url('${ProfilePath}/${Icon01}');
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16px !important; /* Größe des Symbols anpassen */ 
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor;
                            }
              menuitem[label="Chrome-Ordner"] { background-image: url('${ProfilePath}/${Icon02}'); 
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16px !important; /* Größe des Symbols anpassen */
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor; 
                            }
              menuitem[label="CSS-Ordner"] { background-image: url('${ProfilePath}/${Icon03}'); 
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16px !important; /* Größe des Symbols anpassen */
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor;                       
                            }
              menuitem[label="JS-Ordner"] { background-image: url('${ProfilePath}/${Icon04}'); 
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16px !important; /* Größe des Symbols anpassen */
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor;                       
                            }
              menuitem[label="Addon-Verzeichniss"] { background-image: url('${ProfilePath}/${Icon05}');
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16pxx !important; /* Größe des Symbols anpassen */
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor;                       
                            }
              menuitem[label="Programm-Verzeichniss"] { background-image: url('${ProfilePath}/${Icon06}'); 
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16px !important; /* Größe des Symbols anpassen */
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor;                       
                            }
              menuitem[label="Startup-Cache"] { background-image: url('${ProfilePath}/${Icon07}');
                            background-repeat: no-repeat !important; 
                            background-position: 11px 3px !important; 
                            background-size: 16px 16px !important; /* Größe des Symbols anpassen */
                            -moz-context-properties: fill, fill-opacity;
                            fill: currentColor;                       
                            }
      
              #AMAnpassen     { background-image: url('${ProfilePath}/${Icon11}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important;
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;                          
                              }
              #AMModus        { background-image: url('${ProfilePath}/${Icon12}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important;
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
              #AMKonsole      { background-image: url('${ProfilePath}/${Icon13}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important;
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
              #AMWerkzeuge    { background-image: url('${ProfilePath}/${Icon14}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important; 
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
              #AMEntwickler   { background-image: url('${ProfilePath}/${Icon15}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important;
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
              #AMsynchron     { background-image: url('${ProfilePath}/${Icon16}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important; 
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
              #AMdaten        { background-image: url('${ProfilePath}/${Icon17}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important; 
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }        
              #AMManager      { background-image: url('${ProfilePath}/${Icon18}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important; 
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
              #AMOffline      { background-image: url('${ProfilePath}/${Icon19}');
                                background-repeat: no-repeat !important; 
                                background-position: 11px 3px !important;
                                background-size: 16px 16px !important;
                                -moz-context-properties: fill, fill-opacity;
                                fill: currentColor;
                              }
      
      
              /* Neustart-Button */
              #AMreboot { 
                  background-image: url('${ProfilePath}/${ButtonIcon01}');
                  background-repeat: no-repeat !important;
                  background-position: 10px 2px !important;
                  background-size: 20px 20px !important; /* Größe des Symbols anpassen */
                  padding-left: 10px !important; /* Platz für das Symbol lassen */
                  -moz-context-properties: fill, fill-opacity !important;
                  fill: #fbc96e !important;
              }
      
              /* Beenden-Button */
              #AMquit { 
                  background-image: url('${ProfilePath}/${ButtonIcon02}');
                  background-repeat: no-repeat !important;
                  background-position: 12px 3px !important;
                  background-size: 16px 16px !important; /* Größe des Symbols anpassen */
                  padding-left: 10px !important; /* Platz für das Symbol lassen */
                  -moz-context-properties: fill, fill-opacity !important;
                  fill: red !important;
              }
      
          `),
          null,
          null
        );
      
        // CSS-Regeln registrieren
        sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
      })();
      
      if (window.gBrowser) Appmenu.init();
    Alles anzeigen

    Ich weiß, ich schleppe da auch noch Code mit rum, der gar nicht gebraucht, bzw, verwendet wird.
    Aber wer weiß, eventuell will ich doch irgendwann wieder bestimmte CSS oder JavaScripte direkt öffnen können.

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 3. April 2025 um 09:00

    Habe "mein" Problem lösen können!

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 2. April 2025 um 22:59

    2002Andreas Tja, auch das verlinkte Skript erleidet das gleiche Problem.
    Mit Deinem Tipp konnte ich "mein" Skript dann doch wieder zum Leben "erwecken"!

    Ist aber keine Dauerlösung!

  • extras_config_menu.uc.js in Fx 139 keine Funktion mehr

    • Mira_Belle
    • 2. April 2025 um 21:11

    Das wird wohl schwierig werden! Mozilla hat da die Sicherheitsregeln verschärft,
    sodass einige Funktionen nicht mehr funktionieren.
    Eventuell hilft ein anderes Skript ja auch, welches aber immer noch funktioniert
    aber halt nur eine ähnliche Funktionalität bietet.
    Möglicherweise lassen sich ja einige Menüpunkte nachbauen (nachbilden)?


    Beitrag

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

    Hallo FuchsFan  
    Habe ich so geändert. Schau es Dir mal an ob es so passt:

    https://github.com/Endor8/userChr…5/Appmenu.uc.js

    Mfg.
    Endor
    Endor
    14. Februar 2025 um 17:47

Unterstütze uns!

Jährlich (2026)

35,3 %

35,3% (273,24 von 775 EUR)

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