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

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 14. Januar 2025 um 00:09

    Horstmann Vergleiche.

    Altes Skript!

    #208

    VS.

    Neues Skript!

    #248

    Und, ist es einfach?
    Für mich war es jedenfalls nicht einfach, soll aber nichts heißen,
    aber es gab ja auch noch andere, die ein solches Skript nutzen,
    und die haben es nicht geschafft, es zu korrigieren.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 21:46

    Ich hab's, ich fress 'en Besen! Dharkness   FuchsFan

    JavaScript
    // ==UserScript==
    // @name           Jizzmenu.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.13 EventListener angepasst, bzw. korrigiert by Mira Bellenbaum
    // ==/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: [
          /*  Directories  */
    
          // 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:
              "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:
              "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:
              "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.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:
              "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", function (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";
    
        // Wenn Appmenu.isButton true ist, benutze das große Symbol, sonst das kleine
        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
        }
    
        // Button in die richtige Toolbar einfügen
        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.setAttribute("id", "AMpopup");
        this._externalAppPopup = ExternalAppPopup;
        ExternalAppBtn.appendChild(ExternalAppPopup);
        Appmenu.onpopupshowing();
    
        // Menü mit Tastaturkürzel öffnen
        let key = document.createXULElement("key");
        key.id = "key_AppMenuPopup";
        //   key.setAttribute('key', 'X');
        key.setAttribute("key", Appmenu.hotkey);
        if (Appmenu.hotkeyModifier)
          //   key.setAttribute('modifiers', 'alt');
          key.setAttribute("modifiers", Appmenu.hotkeyModifier);
        //key.setAttribute("oncommand",'document.getElementById("AMpopup").openPopup();');
        key.addEventListener("command", function () {
          document.getElementById("AMpopup").openPopup();
        });
        document.getElementById("mainKeyset").appendChild(key);
      },
    
      /* ****** NEU ****** */
    
      onpopupshowing: function () {
        if (this._isready) return;
        if (this._externalAppPopup === null) return;
        var ExternalAppPopup = this._externalAppPopup;
    
        // Funktion zum Erstellen eines Menüs mit Untermenüs
        function createMenuItem(parentPopup, item) {
          var menuItem;
          if (item.name == "separator") {
            menuItem = document.createXULElement("menuseparator");
            parentPopup.appendChild(menuItem);
          } else if (item.submenu && item.submenu.length > 0) {
            menuItem = document.createXULElement("menu");
            var subMenuPopup = document.createXULElement("menupopup");
            menuItem.appendChild(subMenuPopup);
            menuItem.setAttribute("class", "menu-iconic");
            menuItem.setAttribute("label", item.name);
            menuItem.setAttribute("image", item.image);
            parentPopup.appendChild(menuItem);
            for (let subItem of item.submenu) {
              createMenuItem(subMenuPopup, subItem);
            }
          } else {
            menuItem = document.createXULElement("menuitem");
            menuItem.setAttribute("class", "menuitem-iconic");
            menuItem.setAttribute("label", item.name);
            menuItem.setAttribute("image", item.image);
            if (item.command) {
            //  menuItem.setAttribute("oncommand", item.command);
              menuItem.addEventListener("command", function() {
                eval(item.command);
              });
            } else if (item.path) {
            //  menuItem.setAttribute("oncommand","Appmenu.exec(this.path, this.args);");
              menuItem.addEventListener("command",  function () {
                Appmenu.exec(this.path, this.args)
            });
              menuItem.path = item.path;
              menuItem.args = item.args;
            }
            menuItem.setAttribute("tooltiptext", item.tooltiptext || item.name);
            menuItem.setAttribute("id", item.id || "");
            parentPopup.appendChild(menuItem);
          }
        }
    
        // Verarbeitung der Subdirs
        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;
          }
        }
    
        // Verarbeitung der Apps
        for (let app of this.toolbar.apps) {
          if (app.subdir && Appmenu.subdirPopupHash[app.subdir]) {
            createMenuItem(Appmenu.subdirPopupHash[app.subdir], app);
          } else {
            createMenuItem(ExternalAppPopup, app);
          }
        }
    
        // Verarbeitung der Configs
        for (let config of this.toolbar.configs) {
          if (config.subdir && Appmenu.subdirPopupHash[config.subdir]) {
            createMenuItem(Appmenu.subdirPopupHash[config.subdir], config);
          } else {
            createMenuItem(ExternalAppPopup, config);
          }
        }
    
        if (this.autohideEmptySubDirs) {
          for (let key in Appmenu.subdirPopupHash) {
            if (Appmenu.subdirPopupHash[key].hasChildNodes()) {
              continue;
            } else {
              Appmenu.subdirMenuHash[key].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;
      },
    
      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()) {
          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(`
    
    
            #AMProfil   { 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;
                          }
            #AMchrome   { 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; 
                          }
            #AMCSS      { 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;                       
                          }
            #AMJS       { 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;                       
                          }
            #AMAddons   { 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;                       
                          }
            #AMProgramm { 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;                       
                          }
            #AMCache    { 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;
            }
    
        //    /* Menüleiste ausblenden */
        //    #main-menubar > menu { 
        //        display: none !important; 
        //    }
    
        `),
        null,
        null
      );
    
      // CSS-Regeln registrieren
      sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
    })();
    
    if (window.gBrowser) Appmenu.init();
    Alles anzeigen

    Schaut Euch Zeilen 226, bzw, die darauffolgenden an.
    Dann Zeilen 282, bzw, die darauffolgenden an.
    Und Zeilen 319 bis 327:!:

    Nun solltet Ihr Eure Versionen anpassen können.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 20:29
    Zitat von Dharkness

    Hallo zusammen,
    sagt mal gibt es schon eine aktualisierte Version von Appmenu.uc.js?

    JavaScript
    ...

    Nein.
    Das ist das ursprüngliche Skript, auf dem "mein" Appmenu_neu2.uc.js-Skript basiert.

    Ich beiß' mir daran gerade die Zähne aus.

    Zwar habe ich einige Korrekturen vorgenommen, aber das Skript funktioniert noch nicht so wie gewünscht!
    Die Schaltflächen Neustart und auch Beenden funktionieren, ABER ...
    die Ordnerstuckaturen sind total durcheinander und die "Aufrufe" sind auch noch ohne Funktion.
    Ich bin noch drann:!:

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 17:40
    Zitat von Boersenfeger

    Gibts eine Liste, in der die bereits umgeschriebenen Scripte aufgeführt sind?
    Ich nutze 75 Scripte und würde gerne, ohne den ganzen Thread zu durchsuchen, abgleichen, welche schon geändert sind, bzw, welche nicht geändert werden müssen!

    ...

    Da ich manchen Scripten teilweise eigene Namen verpasst habe, ist es natürlich schwierig.

    Eins habe ich bereits hier gefunden und geändert, das hat nun ein _New am Ende der Bezeichnung.

    Du wirst nicht umhinkommen, selber zu testen, welche von Deinen Skripten umgeschrieben werden müssen!
    Habe dafür auch extra die Nightly installiert.
    Und dann heißt es suchen und/oder hier den Code zu posten.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 13:36

    Yes:!:
    Alle meine Skripte funktionieren jetzt.
    Alle:?:
    Nein, leider nicht alle.
    Mein wichtigstes, das Appmenu-Skript bedauerlicherweise noch nicht.
    Und ich habe es mir noch einmal angeschaut, ich denke da sind viel mehr "Baustellen" vorhanden,
    wie ich vermutete.

    Soll ich alle korrigierten Skripts hier noch einmal gebündelt reinstellen?

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 12:16
    Zitat von Mira_Belle

    Sören Hentzschel D.h. ich könnte den Code auch so verwenden?

    JavaScript
    undoItems.map(function (item, id) {
    
            //    m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');            
                m.addEventListener('command', (event) => {
                        undoCloseTab(id);
                    }

    Gerade ausprobiert und es klappt!
    Habe auch zusätzlich aus (event) => { , weil der Wert nie gelesen wird, einfach () => { gemacht.
    Und es klappt.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 12:06

    Sören Hentzschel D.h. ich könnte den Code auch so verwenden?

    JavaScript
    undoItems.map(function (item, index) { // Verwende `index` statt `id`
    
            //    m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');            
                m.addEventListener('command', (event) => {
                    undoCloseTab(index); // `index` statt ' + id + ' verwenden
                    }

    Und die Variable auch "Sören" nennen? :D

    BrokenHeart Um welches Skript geht es eigentlich genau, bei der Konversation mit FuchsFan ?
    Denn vom "Bildchen" her, könnte, wenn der Code funktioniert, eventuell etwas für mein Appmenu_neu2.uc.js abfallen.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 09:43

    Kleiner Nachtrag zu newTabButtonUndoTabList.uc.js.

    Habe das Verhalten noch einmal überhüpft und festgestellt,
    dass es sich ganz normal, also genau wie das Alte verhält.

    Dennoch hätte ich Fragen zu dem Skript!
    1. Warum muss mp.setAttribute("onpopupshowing", "UCT.onpopupshowing(event);"); behandelt werden,
    als wäre es doch ein "EventListener"? (Das Skript funktioniert sonnt nicht!

    JavaScript
        //    mp.setAttribute("onpopupshowing", "UCT.onpopupshowing(event);");
            mp.addEventListener('popupshowing', function(event) {
                UCT.onpopupshowing(event);
            }, true);

    2. Weiter "unten" kommt diese Zeile im Code vor:
    m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');

    Daraus wurde Folgendes gemacht:

    JavaScript
    undoItems.map(function (item, id) {
    
            //    m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');
    			let strCommand = 'undoCloseTab(' + id + ')';
    			m.addEventListener('command', () => {
    				Function("return " + strCommand)();
    			}, true);

    Nur habe ich vorher schon etwas mit dem Skript auseinandergesetzt und bin auf eine andere Lösung gekommen.

    JavaScript
    undoItems.map(function (item, index) { // Verwende `index` statt `id`
    
            //    m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');            
                m.addEventListener('command', (event) => {
                    if (event.button == 0) {
                        undoCloseTab(index); // `index` statt ' + id + ' verwenden
                    }

    Worin bestehen die Vor, bzw. Nachteile der jeweiligen Versionen?


    /* ********************************************************************************************************************************************************************* */

    Zitat von 2002Andreas
    Zitat von Mira_Belle

    das Zweite (Tab schließen + Kontextmenü auch in dem Einstellungsfenster),

    Haben wir schon:

    [/post]

    =O Oh, da habe ich wohl den Überblick verloren!
    Richtig, dieses Skript habe ich schon in korrigierter Fassung.

    Ergo sind es nur 3 Skripte, die mir Kopfzerbrechen bereiten:!:

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 13. Januar 2025 um 00:46
    Zitat von BarbaraZ-

    Jepp, habe mal durchgeschaut und bin mir nur bei einem unsicher.

    Gebe es mal hier zum besten:

    Code
    // Kontextmenu bei Mira_Belle
    
    /// Symbole.uc.js
    /* ****************************************************************************************** */
    
    ...
    })();

    Das Skript sollte uneingeschränkt funktionieren!
    Meines tut es jedenfalls.


    Zischenbilanz!

    CloseTab.uc.js, SkipToTopAndBottom.uc.js & newTabButtonUndoTabList.uc.js funktionieren.
    Wobei newTabButtonUndoTabList.uc.js schon irgendwie merkwürdig reagiert.
    Darauf werde ich ein später in einem eigenen Thread irgendwann noch einmal genauer eingehen.

    Ob UndoListInTabmenuToo.us.js funktioniert, habe ich noch nicht geprüft!
    Aber bei einigen Nutzern scheint es ja so zu sein.

    Nun sind bei mir nur noch 4 Skripte offen. (Die "Translate"-Skripte sind ja nahezu gleich)
    Und ich bekomme es alleine nicht hin!

    Das wäre das erste Skript (Restart item script for Firefox 89+ by Aris),
    das Zweite (Tab schließen + Kontextmenü auch in dem Einstellungsfenster),
    die beiden "Translate"-Skripte,
    und das mir wichtigste, Appmenu_neu2.uc.js.

    Link => #133

    CSS
    // ==UserScript==
    // @name           Jizzmenu.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
    // ==/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: [
          /*  Directories  */
    
          // 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:
              "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:
              "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:
              "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.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:
              "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.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";
    
        // Wenn Appmenu.isButton true ist, benutze das große Symbol, sonst das kleine
        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
        }
    
        // Button in die richtige Toolbar einfügen
        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.setAttribute("id", "AMpopup");
        this._externalAppPopup = ExternalAppPopup;
        ExternalAppBtn.appendChild(ExternalAppPopup);
        Appmenu.onpopupshowing();
    
        // Menü mit Tastaturkürzel öffnen
        let key = document.createXULElement("key");
        key.id = "key_AppMenuPopup";
        //   key.setAttribute('key', 'X');
        key.setAttribute("key", Appmenu.hotkey);
        if (Appmenu.hotkeyModifier)
          //   key.setAttribute('modifiers', 'alt');
          key.setAttribute("modifiers", Appmenu.hotkeyModifier);
        key.setAttribute("oncommand", 'document.getElementById("AMpopup").openPopup();');
    /*
        key.setAttribute ('command', function (event) {
          if (event.button == 0) {
            Appmenu.exec(this.path, this.args);
          }
        });
    */
    
    
        document.getElementById("mainKeyset").appendChild(key);
      },
    
      /* ****** NEU ****** */
    
      onpopupshowing: function () {
        if (this._isready) return;
        if (this._externalAppPopup === null) return;
        var ExternalAppPopup = this._externalAppPopup;
    
        // Funktion zum Erstellen eines Menüs mit Untermenüs
        function createMenuItem(parentPopup, item) {
          var menuItem;
          if (item.name == "separator") {
            menuItem = document.createXULElement("menuseparator");
            parentPopup.appendChild(menuItem);
          } else if (item.submenu && item.submenu.length > 0) {
            menuItem = document.createXULElement("menu");
            var subMenuPopup = document.createXULElement("menupopup");
            menuItem.appendChild(subMenuPopup);
            menuItem.setAttribute("class", "menu-iconic");
            menuItem.setAttribute("label", item.name);
            menuItem.setAttribute("image", item.image);
            parentPopup.appendChild(menuItem);
            for (let subItem of item.submenu) {
              createMenuItem(subMenuPopup, subItem);
            }
          } else {
            menuItem = document.createXULElement("menuitem");
            menuItem.setAttribute("class", "menuitem-iconic");
            menuItem.setAttribute("label", item.name);
            menuItem.setAttribute("image", item.image);
            if (item.command) {
              menuItem.setAttribute("oncommand", item.command);
    
    
            } else if (item.path) {
            menuItem.setAttribute('oncommand', 'Appmenu.exec(this.path, this.args);');  
              menuItem.path = item.path;
              menuItem.args = item.args;
            }
            menuItem.setAttribute("tooltiptext", item.tooltiptext || item.name);
            menuItem.setAttribute("id", item.id || "");
            parentPopup.appendChild(menuItem);
          }
        }
    
        // Verarbeitung der Subdirs
        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;
          }
        }
    
        // Verarbeitung der Apps
        for (let app of this.toolbar.apps) {
          if (app.subdir && Appmenu.subdirPopupHash[app.subdir]) {
            createMenuItem(Appmenu.subdirPopupHash[app.subdir], app);
          } else {
            createMenuItem(ExternalAppPopup, app);
          }
        }
    
        // Verarbeitung der Configs
        for (let config of this.toolbar.configs) {
          if (config.subdir && Appmenu.subdirPopupHash[config.subdir]) {
            createMenuItem(Appmenu.subdirPopupHash[config.subdir], config);
          } else {
            createMenuItem(ExternalAppPopup, config);
          }
        }
    
        if (this.autohideEmptySubDirs) {
          for (let key in Appmenu.subdirPopupHash) {
            if (Appmenu.subdirPopupHash[key].hasChildNodes()) {
              continue;
            } else {
              Appmenu.subdirMenuHash[key].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;
      },
    
      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()) {
          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(`
    
    
            #AMProfil   { 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;
                          }
            #AMchrome   { 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; 
                          }
            #AMCSS      { 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;                       
                          }
            #AMJS       { 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;                       
                          }
            #AMAddons   { 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;                       
                          }
            #AMProgramm { 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;                       
                          }
            #AMCache    { 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;
            }
    
        //    /* Menüleiste ausblenden */
        //    #main-menubar > menu { 
        //        display: none !important; 
        //    }
    
        `),
        null,
        null
      );
    
      // CSS-Regeln registrieren
      sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
    })();
    
    if (window.gBrowser) Appmenu.init();
    Alles anzeigen

    Zeilen 226, 278, 321 & 325 sind m.M. anzupassen. Aber wie?

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 16:58
    Zitat von BrokenHeart

    Besser?

    Äh, nicht so ganz!
    Im "alten" Skript wurden die Tabs, bei mir, in einem "neuen" Tab geöffnet!
    Im "neuen" Skript, wird der aktuelle Tab überschrieben!
    Aber halt, mir fällt da was ein, habe ich da im Firefox, also in Version 134 irgendetwas eingestellt?
    Wenn ich nur wüsste.:/

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 15:48
    Zitat von Endor

    Hallo milupo.

    Danke. Hatte ich übersehen.
    Leider funktioniert diese Version hier nicht richtig.
    Das Popup mit den Einträgen wird angezeigt, aber bei klick drauf tut sich hier nichts.
    Weiß jetzt nicht wie es sich bei Mira_Belle verhält.

    Auch das öffnen der Chronik in Seitenleiste unterster Menüpunkt tut sich nichts.
    Diesen Teil konnte ich mittlerweile selber beheben.

    Mfg.
    Endor

    Dito!
    Popup und Einträge werden angezeigt, aber bei "Click" tut sich nichts!
    Es werden keine Tabs wiederhergestellt.

    Das muss mit der id in Zeile 68 bzw. Zeile 76 zusammenhängen!
    VS sagt:

    Code
    "id" ist deklariert, aber der zugehörige Wert wird nie gelesen.ts(6133)
    (parameter) id: any

    Nur, ich kann damit nicht wirklich etwas anfangen!
    Vermute aber, dass in Zeile 76 die Variabel nicht zugeordnet werden kann,
    es sieht auch nicht wie eine Variabel aus.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 14:04

    Oh nein:!:Ich bin sooo doof:!::!:
    Bein herumexperimentieren habe ich mir newTabButtonUndoTabList.uc.js zerschossen
    und nun weiß ich nicht mehr, wie ich Zeile 40 korrigiert hatte.


    Oh man, ich sollte mal eine Pause machen!
    In #109 steht doch die Lösung!!

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 13:00

    milu War dann in meinem Versuch einfach nur den Fehler doch "oncommand" zu benutzen?
    Und hätte :

    JavaScript
    item.setAttribute('command', function(event) {
    gExternalApplications.exec(this.path, this.args);
    }, true)

    funktionieren können?

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 12:15
    Zitat von 2002Andreas

    Somit funktionieren 15 Skripte dank eurer Hilfe wieder einwandfrei:)

    Und mir fehlen noch 5 ;(
    und ich bekomme es selber einfach nicht hin. ;(

    newTabButtonUndoTabList.uc.js & SkipToTopAndBottom.uc.js funktionieren jetzt ja.

    Also bleiben noch,
    das Erste (Restart item script for Firefox 89+ by Aris),
    das Zweite (Tab schließen + Kontextmenü auch in dem Einstellungsfenster),
    die "Translate"-Skripte,
    UndoListInTabmenuToo.uc.js
    und Appmenu_neu2.uc.js,
    die noch nicht funktionieren.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 12:04

    2002Andreas Schau mal Zeile 115, da hat milupo ein i vergessen.

    Nicht tem.addEventListener ('command', function (event) {, sondern item.addEventListener ('command', function (event) {
    müsste das heißen.

    milupo Wie bist Du denn auf

            item.addEventListener ('command', function (event) {
                        if (event.button == 0) {
                gExternalApplications.exec(this.path, this.args);
           } ,anstatt

            item.setAttribute('oncommand', function(event) {
                gExternalApplications.exec(this.path, this.args);
            }, true) gekommen?

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 11:44

    2002Andreas Ist nur ein Versuch!

    JavaScript
    // ==UserScript==
    // @name           Thunderbird.uc.js
    // @namespace      ithinc#mozine.cn
    // @description    External Applications
    // @include        main
    // @compatibility  Firefox 3.5.x
    // @author         ithinc
    // @version        20091212.0.0.1 Initial release
    // ==/UserScript==
    
    /* :::: External Applications :::: */
    
    var gExternalApplications = {
      type: 'button', //'menu' or 'button'
      insertafter: 'urlbar-container',
    
      apps: [
        
        {name: 'Thunderbird', path: 'C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe'},
       
      ],
    
      init: function() {
        for (var i=0; i<this.apps.length; i++) {
          if (!this.apps[i].path) continue;
          if (!this.apps[i].args) this.apps[i].args = [];
    
          this.apps[i].path = this.apps[i].path.replace(/\//g, '\\');
    
          var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
          if (/^(\\)/.test(this.apps[i].path)) {
            this.apps[i].path = ffdir.substr(0,2) + this.apps[i].path;
          }
          else if (/^(\.)/.test(this.apps[i].path)) {
            this.apps[i].path = ffdir + '\\' + this.apps[i].path;
          }
        }
    
        if (this.type == 'menu') {
          var mainmenu = document.getElementById('main-menubar');
          var menu = mainmenu.appendChild(document.createXULElement('menu'));
          menu.setAttribute('label', 'Start');
          menu.setAttribute('accesskey', 'a');
    
          var menupopup = menu.appendChild(document.createXULElement('menupopup'));
          for (var i=0; i<this.apps.length; i++) {
            menupopup.appendChild(this.createMenuitem(this.apps[i]));
          }
        }
        else {
          var menubarItems = document.getElementById(this.insertafter);
          var toolbaritem = menubarItems.parentNode.insertBefore(document.createXULElement('toolbaritem'), menubarItems.nextSibling);
    	  toolbaritem.id = 'ExtAppButtons';
          toolbaritem.setAttribute("class", "chromeclass-toolbar-additional");
          toolbaritem.setAttribute("orient", "horizontal");
          for (var i=0; i<this.apps.length; i++) {
            toolbaritem.appendChild(this.createButton(this.apps[i]));
          }
        }
      },
    
      exec: function(path, args) {
        for (var i=0; i<args.length; i++) {
          args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
        }
    
        var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
        file.initWithPath(path);
        if (!file.exists()) {
          throw 'File Not Found: ' + path;
        }
    
        if (!file.isExecutable() || args.length==0) {
          file.launch();
        }
        else {
          var process = Cc['@mozilla.org/process/util;1'].getService(Ci.nsIProcess);
          process.init(file);
          process.run(false, args, args.length);
        }
      },
    
      createButton: function(app) {
        if (app.name == 'separator')
          return document.createXULElement('toolbarseparator');
    
        var item = document.createXULElement('toolbarbutton');
        item.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional');
        item.setAttribute('label', app.name);
        item.setAttribute('image', 'moz-icon:file:///' + app.path + '?size=16');
            //item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
    		item.setAttribute('oncommand', function(event) {
    			gExternalApplications.exec(this.path, this.args);
    		}, true);
       // item.setAttribute('tooltiptext', app.name);
        item.path = app.path;
        item.args = app.args;
        return item;
      },
    
      createMenuitem: function(app) {
        if (app.name == 'separator')
          return document.createXULElement('menuseparator');
    
        var item = document.createXULElement('menuitem');
        item.setAttribute('class', 'menuitem-iconic');
        item.setAttribute('label', app.name);
        item.setAttribute('image', 'moz-icon:file:///' + app.path + '?size=16');
            //item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
    		item.setAttribute('oncommand', function(event) {
    			gExternalApplications.exec(this.path, this.args);
    		}, true)
        item.path = app.path;
        item.args = app.args;
        return item;
      }
    };
    gExternalApplications.init();
    Alles anzeigen

    Wenn sich jemand meiner Skripte annehmen würde, bitte.
    Wichtig für mich wäre jenes, welches im ZIP ist!
    Und die Liste ist ja auch schon etwas kleiner, es sind ja nur noch 6 Stück.
    Wo bei zwei im Prinzip gleich sind, als fünf, quasi.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 01:40

    zu1.
    Oh, ehrlich? Dann muss ich noch mal schauen.

    zu2.
    :/ Habe ich übersehen! Sorry.

    zu3.
    Danke, habe ich nach diesem "Muster" korrigiert.


    Nachtrag!
    zu2.

    JavaScript
            let undoItems = SessionStore.getClosedTabDataForWindow(window);
            undoItems.map(function (item, id) {
                var m = document.createXULElement('menuitem');
                m.setAttribute('label', item.title);
                m.setAttribute('image', item.image );
                m.setAttribute('class', 'menuitem-iconic bookmark-item');
            //    m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');
                m.addEventListener('command', function(event) {
    				undoCloseTab(' + id + ');
    			}, true);
                popup.appendChild(m);
            });
    Alles anzeigen

    will einfach nicht! Why?

    :!:Nachtrag II:!:
    Ich Hirni 8o! Zeile 40 vergessen. Jetzt funktioniert es.

    Letzter Nachtrag!
    zu1.
    Ja, aber es funktioniert wohl ganz anders und ich habe jenes gar nicht in Benutzung,
    sondern habe nur jenes von FuchsFan angepasst!
    "Mein" Skript generiert einen verschiebbaren Button.

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 12. Januar 2025 um 00:53

    BrokenHeart Jep!
    Habe mir die 136.0a1 parallel installiert und meine Skripts alle durch getestet!

    Es sind acht an der Zahl, die nicht mehr funktionieren. :/

    JavaScript
    /* Restart item script for Firefox 89+ by Aris
    
      - left-click on restart item: normal restart
      - middle-click on restart item: restart + clear caches
      - right-click on restart item: no special function
      
      - option: display restart icon in menubars 'File' menu
      - option: display restart icon in main menus popup
    
      - based on 'addRestartButton.uc.js' script by Alice0775
      - restart code from Classic Theme Restorer add-on
      - invalidate caches from Session Saver add-on
    
      https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/restart_item_in_menu.uc.js
    */
    
    var appversion = parseInt(Services.appinfo.version);
    var menuicon = false;
    var appmenuicon = false;
    
    var RestartMenuFileAppItems = {
      init: function() {
    
    	var button_label = "Neustart";
    
    	try {
    	  restartitem_appmenu = document.createXULElement("toolbarbutton");
    	  restartitem_appmenu.setAttribute("label", button_label);
    	  restartitem_appmenu.setAttribute("id","appMenu-restart-button");
    	  restartitem_appmenu.setAttribute("class","subviewbutton");
    	  restartitem_appmenu.setAttribute("insertbefore", "appMenu-quit-button2");
    	  restartitem_appmenu.setAttribute("onclick", "if (event.button == 0) {RestartMenuFileAppItems.restartApp(false);} else if (event.button == 1) {RestartMenuFileAppItems.restartApp(true)};");
    	  restartitem_appmenu.setAttribute("oncommand", "RestartMenuFileAppItems.restartApp(false);");  
    	  	  
    	  var AMObserver = new MutationObserver(function(mutations) {
    	    mutations.forEach(function(mutation) {
    			if(document.querySelector("#appMenu-restart-button") == null ) document.querySelector("#appMenu-quit-button2").parentNode.insertBefore(restartitem_appmenu,document.getElementById("appMenu-quit-button2"));
    	    });    
    	  });
    	
    	 AMObserver.observe(document.querySelector("#PanelUI-menu-button"), { attributes: true, attributeFilter: ['open'] });
    	
    	} catch(e) {}
    		  
    	 let ProfilePath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Profilordner und gleich in den entsprechenden Unterordner
    	 let ButtonIcon = "restart.svg"; // Name & Dateiendung des anzuzeigenden Symbols!    
    	 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(`
       
    		#appMenu-restart-button { list-style-image: url("${ProfilePath}/${ButtonIcon}") }
    		#appMenu-restart-button > .toolbarbutton-icon {
    			margin-inline-end: 6px !important;
    			width: 19px !important;
    			height: 19px !important;
    			}
       		#appMenu-restart-button > image:nth-child(1) {
    			margin-left: -2px !important;
    			}
    
    		`), null, null);
       
    	 sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
    	
      },
    
      restartApp: function(clearcaches) {
    
    	var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].createInstance(Components.interfaces.nsISupportsPRBool);
    	var observerSvc = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
    
    	if(clearcaches) {
    	  Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).invalidateCachesOnRestart();
    	}
    	observerSvc.notifyObservers(cancelQuit, "quit-application-requested", "restart");
    	if(cancelQuit.data) return false;
    	Services.startup.quit(Services.startup.eRestart | Services.startup.eAttemptQuit);
    
      }
    }
    
    RestartMenuFileAppItems.init();
    Alles anzeigen


    JavaScript
    // ==UserScript== 
    // @name           
    // @description    Tab schließen + Kontextmenü auch in dem Einstellungsfenster
    // @charset        UTF-8
    // @author         @aborix
    // @version        v2024.09.10
    // @note           Vorlage Script von @aborix (+ Änderungen von @milupo aus dem Fuchsforum 1.10.24)
    // @note           Zeile 32 Anpassung von @milupo ( 08.10.2024 ab Fx 132 > tabbrowser-tabbox statt appcontent)
    // Zeile 29        https://www.camp-firefox.de/forum/thema/112673/?postID=1247653#post1247653
    // Zeile 32        https://www.camp-firefox.de/forum/thema/138429/?postID=1257843#post1257843
    // Source          https://www.camp-firefox.de/forum/thema/131567/?postID=1158359#post1158359
    // Weitere Url     https://www.camp-firefox.de/forum/thema/138429/?postID=1257796#post1257796
    // Weitere Url     https://www.camp-firefox.de/forum/thema/138429/?postID=1257854#post1257854
    // Weitere Url     https://www.camp-firefox.de/forum/thema/112673/?postID=1247653#post1247653
    
    
    (function() {
    
      if (!window.gBrowser)
        return;
    
      var contextMenu = document.getElementById('contentAreaContextMenu');
      var menuseparator = document.createXULElement('menuseparator');
      menuseparator.id = 'context-sep-closetab';
      contextMenu.append(menuseparator);
      var menuitem = document.createXULElement('menuitem');
      menuitem.id = 'context-closetab';
      menuitem.setAttribute('label', 'Tab schließen');
      menuitem.setAttribute('oncommand', 'BrowserCommands.closeTabOrWindow();');
      contextMenu.append(menuitem);
    
      var appcontent = document.getElementById('tabbrowser-tabbox');
      appcontent.addEventListener('contextmenu', event => { 
        setTimeout(() => {
          if (gContextMenu && !gContextMenu.shouldDisplay) {
            for (let string of 'back forward reload bookmarkpage'.split(' ')) {
              document.getElementById('context-' + string).removeAttribute('hidden');
            }
            document.getElementById('context-stop').setAttribute('hidden', 'true');
            const A = 'navigation sep-navigation savepage sep-paste selectall sep-viewsource viewsource viewinfo sep-bidi inspect-a11y inspect sep-closetab closetab'.split(' ');
            for (let node of contextMenu.childNodes) {
              if (A.includes(node.id.substring(8)))
                node.removeAttribute('hidden');
              else
                node.setAttribute('hidden', 'true');
            }
            contextMenu.openPopupAtScreen(event.screenX, event.screenY, true, event);
          }
        }, 50);
      });
    })();
    Alles anzeigen


    JavaScript
    // Translate_DeepL.uc.js
    // https://github.com/ardiman/userChrome.js/tree/master/contexttranslate
    // ex ContextTranslate.uc.js///
    // modifiziert by universum 123, Umlaute geändert by 2002Andreas
    // https://www.camp-firefox.de/forum/thema/126100/?postID=1107070#post1107070
    
    (function () {
    	if (location.href !== 'chrome://browser/content/browser.xhtml') return;
    	let translate = function () {
    		let browserMM = gBrowser.selectedBrowser.messageManager;
    		browserMM.addMessageListener('getSelection', function listener(message) {
    			let t = (message.data !== '');
    			let e = (document.charset || document.characterSet);
    			if (t) {
    				openWebLinkIn('https://www.deepl.com/translator#en/de/' + encodeURIComponent(message.data), 'tab');
    			} else {
    				openWebLinkIn('https://www.deepl.com/translate?u=' + encodeURIComponent(gBrowser.currentURI.spec) + '&hl=de-DE&ie=' + e + '&sl=auto&tl=de-DE', 'tab');
    			};
    			browserMM.removeMessageListener('getSelection', listener, true);
    		});
    		browserMM.loadFrameScript('data:,sendAsyncMessage("getSelection", content.document.getSelection().toString())', true);
    	}
    	let menuitem = document.createXULElement('menuitem');
    		menuitem.id = 'context-DeepLtranslate';
    		menuitem.setAttribute('label', '\u00dcbersetzen (DeepL)');
    		menuitem.setAttribute('oncommand', '(' + translate.toString() + ')()');
    		menuitem.classList.add('menuitem-iconic');
    	let ProfilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");
    	let ButtonIcon = "DeepL_2.png";
    		menuitem.style.listStyleImage = 'url("' + ("file:" + ProfilePath + "/chrome/icons/" + ButtonIcon) + '")';
    	let refItem = document.getElementById('context-inspect');
    	refItem.parentNode.insertBefore(menuitem, refItem);
    })();
    Alles anzeigen

    Das hier ist dem Vorherigen sehr ähnlich, nur dass per Google übersetzt wird!

    JavaScript
    // ContextTranslate_Google.uc.js
    // https://github.com/ardiman/userChrome.js/tree/master/contexttranslate
    // ex ContextTranslate.uc.js///
    // modifiziert by universum 123, Umlaute geändert by 2002Andreas
    // https://www.camp-firefox.de/forum/thema/126100/?postID=1107070#post1107070
    
    (function () {
    	if (location != 'chrome://browser/content/browser.xhtml')
    		return;
    	let translate = function () {
    		let browserMM = gBrowser.selectedBrowser.messageManager;
    		browserMM.addMessageListener('getSelection', function listener(message) {
    			let t = (message.data !== '');
    			let e = (document.charset || document.characterSet);
    			if (t) {
                    openWebLinkIn('https://translate.google.com/?sl=en&tl=de&text=' + encodeURIComponent(message.data), 'tab');
    			} else {
    				openWebLinkIn('https://translate.google.com/translate?u=' + encodeURIComponent(gBrowser.currentURI.spec) + '&hl=de-DE&ie=' + e + '&sl=auto&tl=de-DE', 'tab');
    			};
    			browserMM.removeMessageListener('getSelection', listener, true);
    		});
    		browserMM.loadFrameScript('data:,sendAsyncMessage("getSelection", content.document.getSelection().toString())', true);
    	}
    	let menuitem = document.createXULElement('menuitem');
    	menuitem.id = 'context-googletranslate';
    	menuitem.setAttribute('label', '\u00dcbersetzen (Google)');
    	menuitem.setAttribute('oncommand', '(' + translate.toString() + ')()');
    	menuitem.classList.add('menuitem-iconic');
    	let ProfilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");
    	let ButtonIcon = "Google.svg";
    	menuitem.style.listStyleImage = 'url("' + ("file:" + ProfilePath + "/chrome/icons/" + ButtonIcon) + '")';
        let refItem = document.getElementById('context-inspect');
    	refItem.parentNode.insertBefore(menuitem, refItem);
    })();
    Alles anzeigen
    JavaScript
    // newTabButtonUndoTabList.uc.js
    
    "use strict";
    /* ******************************************************************************************************** */
    /* Beschreibung                                                                                             */
    /* Bei Rechtsklick auf die Neuen Tab Schaltfläche, wird im Kontextmenü,                                     */
    /* der Eintrag zum Wiederherstellen des zuletzt geschlossenen Tabs angezeigt.                               */
    /* Customized by BrokenHeart                                                                                */
    /*                                                                                                          */
    /* https://www.camp-firefox.de/forum/thema/112673/?postID=1223733#post1223733                               */
    /* https://www.camp-firefox.de/forum/thema/112673/?postID=1228286#post1228286                               */
    /*                                                                                                          */
    /* ******************************************************************************************************** */
    
    (function () {
    
        if (!window.gBrowser){
            return;
        }
        
        gBrowser.tabContainer.addEventListener('click', function (e) {
            if (e.originalTarget.id != 'tabs-newtab-button') return;
            switch (e.button) {
                case 1:
                    undoCloseTab(0);
                    break;
                case 2:
                    UCT.makePopup(e);
                    event.preventDefault();
                    break;
            }
        }, false);
    
    })();
    
    var UCT = {
        init: function () {
            var mp = document.createXULElement("menupopup");
            mp.id = "undo-close-tab-list";
            mp.setAttribute("onpopupshowing", "UCT.onpopupshowing(event);");
            mp.setAttribute("placespopup", true);
            mp.setAttribute("tooltip", "bhTooltip");
            mp.setAttribute("popupsinherittooltip", true);
            document?.getElementById("mainPopupSet")?.appendChild(mp);
        },
    
        makePopup: function (e) {
    
            if (SessionStore.getClosedTabCountForWindow(window) != 0) {            
                document.getElementById("undo-close-tab-list").openPopupAtScreen(e.screenX +2, e.screenY +2, false);
            }
            else
            {
                console.log("--- Es gibt keinen Tab, der wiederhergestellt werden kann ---");
            }
        },
    
        onpopupshowing: function (e) {
            var popup = e.target;
    
            while (popup.hasChildNodes())
                popup.removeChild(popup.firstChild);
    
            let undoItems = SessionStore.getClosedTabDataForWindow(window);
            undoItems.map(function (item, id) {
                var m = document.createXULElement('menuitem');
                m.setAttribute('label', item.title);
                m.setAttribute('image', item.image );
                m.setAttribute('class', 'menuitem-iconic bookmark-item');
                m.setAttribute('oncommand', 'undoCloseTab(' + id + ')');
                popup.appendChild(m);
            });
        },
    };
    
    setTimeout(function() {
          UCT.init();
      },250);
    Alles anzeigen

    Das hatte ich schon mal gepostet, funktioniert aber nicht!

    JavaScript
    //SkipToTopAndBottom.uc.js
    (function() {
    
        let ProfilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");  // Pfadangabe zum Profilordner
        let up = "arrow-up.svg";
    
        let menuitem = document.createXULElement('menuitem');
            menuitem.id = 'context-to-top';
            menuitem.classList.add('menuitem-iconic');
            menuitem.setAttribute('tooltiptext' , 'Zum Seitenanfang springen');
            menuitem.style.listStyleImage = 'url("' + ("file:" + ProfilePath + "/chrome/icons/" + up) + '")';
            menuitem.setAttribute('oncommand' , "ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo({ top: 0, left: 0, behavior: \"smooth\" }) ' , false);");
        let refItem = document.getElementById('context-reload');
        refItem.parentNode.insertBefore(menuitem, refItem);
         
        })();
        
        (function() {
    
        let ProfilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");  // Pfadangabe zum Profilordner
        let down = "arrow-down.svg";
        
        let menuitem = document.createXULElement('menuitem');
            menuitem.id = 'context-to-bottom';
            menuitem.classList.add('menuitem-iconic');
            menuitem.setAttribute('tooltiptext' , 'Zum Seitenende springen');
            menuitem.style.listStyleImage = 'url("' + ("file:" + ProfilePath + "/chrome/icons/" + down) + '")';
            menuitem.setAttribute('oncommand' , "ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo({ top: 100000, left: 0, behavior: \"smooth\" }) ' , false);");
        let refItem = document.getElementById('context-reload');
        refItem.parentNode.insertBefore(menuitem, refItem);
         
        })();
    Alles anzeigen
    JavaScript
    // ==UserScript==
    // @name           UndoListInTabmenuToo.uc.js
    // @namespace      http://space.geocities.yahoo.co.jp/gl/alice0775
    // @description    Kürzlich geschlossene Tabsliste in Tab-Kontext und Hauptkontextmenü einfügen.
    // @include        main
    // @compatibility  Firefox 117
    // @author         Alice0775
    // @version        2023/07/02 Einträge für Fenster entfernt
    // @version        2023/06/16 08:00 Bug 1819675 - Expand recently closed tabs to include all Windows
    // @version        2022/05/10 fix ref to context-media-eme-separator
    // @version        2021/12/09 remove JSON.parse (Bug 1733425)
    // @version        2021/04/25 fix 1689378
    // @version        2019/11/14 remove eval
    // @version        2019/06/30 10:00 Bug 1555060 Convert <tabs> to a custom element
    // @version        2019/06/24 23:00 wait for gBrowser initialized
    // @version        2019/05/21 08:30 fix 69.0a1 Bug 1551320 - Replace all createElement calls in XUL documents with createXULElement
    // @version        2018/05/10 60
    // @version        2017/11/18 nsIPrefBranch to nsIPrefBranch
    // @version        2010/09/18 00:00 4.0b7pre
    // @version        2009/02/03 13:00 Tab-Verlauf im Tooltip anzeigen
    // @Note           Fügt die UndoClose-Tab-Liste zu Tabs und Kontextmenüs hinzu
    // @OriginalCode   Orginalcode aus browser.js für populateUndoSubmenu verwenden
    // @version        2018/05/09 15:00 61
    // ==/UserScript==
    // @version        2010/03/26 13:00  Minefield/3.7a4pre Bug 554991 -  allow tab context menu to be modified by normal XUL overlays
    // @version        2010/03/15 00:00  Minefield/3.7a4pre Bug 347930 -  Tab strip should be a toolbar instead
    // @version        2009/09/09 15:00 Mittelklick-Handhabung
    // @version        2009/09/03 22:00 Firefox3.7a1pre Funktion wurde wieder hergestellt. (Bug 489925. getElementById should not return anonymous nodes)
    // @version        2009/08/22 00:00 Firefox3.6 Ändern des stringbandle
    // @version        2009/04/24 00:00 #394759 [Firefox:Session Restore]-Add undo close window feature
    // @version        2008/10/12 18:00 Fx3.0.4pre Mittelklick-Popupmenü wurde nicht geschlossen und andere Korrekturen
    // @version        2007/10/05 10:00
    
    var UndoListInTabmenu = {
    // -- config --
      TABCONTEXTMENU : false , //Im Tabkontextmenü: anzeigen: true, nicht anzeigen: false
      CONTEXTMENU    : false,  //Im Hauptkontextmenü: anzeigen: true , nicht anzeigen: false
    // -- config end--
      ss: null,
    
      get tabContext() {
        return document.getElementById("tabContextMenu");
      },
    
      get navigatorBundle() {
        return Services.strings.createBundle(
               "chrome://browser/locale/browser.properties"
               );
      },
    
      init: function(){      
        var css =`
          #tabContextUndoList :is(menu,menuitem),
          #ContextUndoList :is(menu,menuitem) {
            min-height: 20px !important;
            padding-top: 0 !important; 
            padding-bottom: 0 !important;
          } 
        `;  
      var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
      var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
      sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
    
        if (this.TABCONTEXTMENU){
          //Tabkontextmenü
          var tabContext = this.tabContext;
          this.makePopup(tabContext, null, "tabContextUndoList");
        }
        if (this.CONTEXTMENU){
          //Hauptkontextmenü
          var contextMenu = document.getElementById("contentAreaContextMenu");
          var refItem = document.getElementById("context-media-eme-separator");
          this.makePopup(contextMenu, refItem, "ContextUndoList");
        }
        // Geschlossene Tabs dem NS-Sitzungsspeicher entnehmen
        this._ss = SessionStore;
    
      },
    
      makePopup: function(popup, refItem, id){
        var menu;
        //label
        const locale = "de";
    
        //Liste kürzlich geschlossener Tabs
        const LABELTEXT = "Kürzlich geschlossene Tabs";    //create menu
        menu = document.createXULElement("menu");
        menu.setAttribute("label", LABELTEXT);
        menu.setAttribute("accesskey", "T");
        if (id)
          menu.setAttribute("id", id);
        var menupopup = document.createXULElement("menupopup");
        menupopup.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoSubmenu(this);");
        menu.appendChild(menupopup);
        popup.insertBefore(menu, refItem);
    
        //Eventlistener hinzufügen
        popup.addEventListener('popupshowing',function(event) {
          UndoListInTabmenu.toggleRecentlyClosedWindows();
          if (UndoListInTabmenu._ss.getClosedTabCount(window) == 0) {
            menu.setAttribute("disabled", true);
            return;
          }
          menu.removeAttribute("disabled");
        },false);
      },
      
       /* Befüllen, wenn das Chronik-Menü geöffnet ist (Fx3.6) */
       
      populateUndoSubmenu: function(undoPopup) {
            while (undoPopup.hasChildNodes()) {
                undoPopup.removeChild(undoPopup.firstChild);
            }
            var utils = RecentlyClosedTabsAndWindowsMenuUtils;
            var tabsFragment = utils.getTabsFragment(
              window,
          "menuitem",
           aPrefixRestoreAll =  true,
          "menu-history-reopen-all-tabs"
        ); 
            undoPopup.appendChild(tabsFragment);
            undoPopup.firstChild.setAttribute("accesskey", "R");
            var m = undoPopup.insertBefore(document.createXULElement("menuitem"), undoPopup.childNodes[0]);
            m.setAttribute("label", "Letzten geschlossenen Tab wieder öffnen (s)");
            m.setAttribute("oncommand", "undoCloseTab()");
            m.setAttribute("accesskey", "o");
        undoPopup.insertBefore(document.createXULElement(""), undoPopup.childNodes[2]); 
      
        // populate tab historis for tooltip
        var undoItems = UndoListInTabmenu._ss.getClosedTabDataForWindow(window);
        for (var i = 0; i < undoItems.length; i++) {
          var entries = undoItems[i].state.entries;
          var tooltiptext = "";
          for (var j = entries.length - 1; j > -1; j--){
            if (j != entries.length - 1)
              tooltiptext += "\n";
            tooltiptext += parseInt(j + 1, 10) + ". " + entries[j].title;
          }
          undoPopup.childNodes[i + 2/*restore all, sep*/].setAttribute("tooltiptext", tooltiptext);
        }
    
        // "Append Clear undo close tb list"
        undoPopup.appendChild(document.createXULElement(""));
    
        m = undoPopup.appendChild(document.createXULElement("menuitem"));
        m.setAttribute("label", "Liste der letzten Tabs l\u00F6schen");
        m.setAttribute("accesskey", "h");
        m.addEventListener("command", function() {
          let prefs = Services.prefs;
          let max_undo = prefs.getIntPref("browser.sessionstore.max_tabs_undo");
          prefs.setIntPref("browser.sessionstore.max_tabs_undo", 0);
          prefs.setIntPref("browser.sessionstore.max_tabs_undo", max_undo);
        }, false);
      },
    
      toggleRecentlyClosedWindows: function PHM_toggleRecentlyClosedWindows() {
        // enable/disable the Recently Closed Windows sub menu
        let undoPopup = this.historyUndoWindowPopup3;
        // no restorable windows, so disable menu
        if (this._ss.getClosedWindowCount() == 0)
          this.historyUndoWindowPopup3.parentNode.setAttribute("disabled", true);
        else
          this.historyUndoWindowPopup3.parentNode.removeAttribute("disabled");
      },
    
      /**
       * Populate when the history menu is opened
       */
      populateUndoWindowSubmenu: function PHM_populateUndoWindowSubmenu(undoPopup) {
            while (undoPopup.hasChildNodes()) {
                undoPopup.removeChild(undoPopup.firstChild);
            }
            let utils = RecentlyClosedTabsAndWindowsMenuUtils;
            let windowsFragment = utils.getWindowsFragment(
          window,
          "menuitem",
           aPrefixRestoreAll =  true,
          "menu-history-reopen-all-windows"
        );
        undoPopup.appendChild(windowsFragment);
        undoPopup.firstChild.setAttribute("accesskey", "R");
        undoPopup.insertBefore(document.createXULElement(""), undoPopup.childNodes[1]);
        } 
    };
    
    // Wir sollten die Weiterleitung nur starten, wenn das Browserfenster den Startprozess abgeschlossen hat
    // Ansonsten sollten wir warten, bis der Start abgeschlossen ist.
        if (gBrowserInit.delayedStartupFinished) {
        UndoListInTabmenu.init();
        } 
        else {
        let delayedStartupFinished = (subject, topic) => {
        if (topic == "browser-delayed-startup-finished" &&
            subject == window) {
          Services.obs.removeObserver(delayedStartupFinished, topic);
          UndoListInTabmenu.init();
        }
        };
        Services.obs.addObserver(delayedStartupFinished,
                               "browser-delayed-startup-finished");
        }
    Alles anzeigen

    Und das Letzte ist zu groß (lang), als dass ich es hier posten könnte.
    Deshalb als ZIP

    Appmenu_neu2.uc.js.zip

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 11. Januar 2025 um 23:41

    Wegen der Funktion an den Anfang oder das Ende einer Page zu scrollen,
    nutze ich dieses Skript:

    JavaScript
    //SkipToTopAndBottom.uc.js
    (function() {
    
        let ProfilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");  // Pfadangabe zum Profilordner
        let up = "arrow-up.svg";
    
        let menuitem = document.createXULElement('menuitem');
            menuitem.id = 'context-to-top';
            menuitem.classList.add('menuitem-iconic');
            menuitem.setAttribute('tooltiptext' , 'Zum Seitenanfang springen');
        //    menuitem.style.listStyleImage='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiElEQVR42mNkoBAw4pFjAuIWIP4NxA1A/J8UA0Ca5wFxPJQ/C4gzsBnCSIRmBnyGMBKpGachjCRoxmoII4maMQyBGVAOxB1EaoaBEiDuxRaI4kD8AocmCSB+iS8QRw2AAHYgfgXEfGjin4BYDIh/EjIABNyBuAyIuaD8b0DcBcQ70RXiy41EAQBJ/SQRxtinwAAAAABJRU5ErkJggg==")';
            menuitem.style.listStyleImage = 'url("' + ("file:" + ProfilePath + "/chrome/icons/" + up) + '")';
        //    menuitem.setAttribute('oncommand' , "ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo(0,0) ' , false);");
            menuitem.setAttribute('oncommand' , "ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo({ top: 0, left: 0, behavior: \"smooth\" }) ' , false);");
        let refItem = document.getElementById('context-reload');
        refItem.parentNode.insertBefore(menuitem, refItem);
         
        })();
        
        (function() {
    
        let ProfilePath = Services.dirsvc.get("ProfD", Ci.nsIFile).path.replace(/\\/g, "/");  // Pfadangabe zum Profilordner
        let down = "arrow-down.svg";
        
        let menuitem = document.createXULElement('menuitem');
            menuitem.id = 'context-to-bottom';
            menuitem.classList.add('menuitem-iconic');
            menuitem.setAttribute('tooltiptext' , 'Zum Seitenende springen');
        //    menuitem.style.listStyleImage='url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAhUlEQVR42mNkoBAw4hB3B+IyIOaC8r8BcRcQ7yTGAHYgfgXEfGjin4BYDIh/EjJAHIhf4HCZBBC/HDUAuwHFQNzDQBqoAOJORiSDZgBxGpGaFwJxEhD/Q/YCsYbANWMLA0KGoGjGFYi4DMHQjMsAbIZg1YzPAJhcAxCzAnENNs2EDCAKAADTlCMRQhQlFQAAAABJRU5ErkJggg==")';
            menuitem.style.listStyleImage = 'url("' + ("file:" + ProfilePath + "/chrome/icons/" + down) + '")';
        //    menuitem.setAttribute('oncommand' , "ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo(0,100000) ' , false);");
            menuitem.setAttribute('oncommand' , "ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo({ top: 100000, left: 0, behavior: \"smooth\" }) ' , false);");
        let refItem = document.getElementById('context-reload');
        refItem.parentNode.insertBefore(menuitem, refItem);
         
        })();
    Alles anzeigen

    Wie immer Symbole und eventuell den Pfad ändern!

  • Div. Skripte funktionieren im aktuellem Nightly nicht mehr

    • Mira_Belle
    • 11. Januar 2025 um 23:17

    Also ich hätte da eine ganze Sammlung von Skripten, wo ich vermute, dass sie angepasst werden müssten.
    Es sind neun an der Zahl! Würde die jemand für mich "testen"?
    Und mir auch mitteilen, welche nicht funktionieren wollen.
    Oder gibt mir jemand per PN eine Anleitung, wie ich eine Vorabversion des Firefoxes so installiere,
    dass mein Profil, aber auch die stabile Version nicht angetastet wird.
    Muss ich mir eine VM anlegen? Fragen über Fragen.

Unterstütze uns!

Jährlich (2025)

104,5 %

104,5% (679,10 von 650 EUR)

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