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

Beiträge von FuchsFan

  • 1 Script funktioniert nicht mehr und ich weiss nicht, welches es von diesen 2 (Zusatzleisten) ist.

    • FuchsFan
    • 15. August 2026 um 10:10
    Zitat von 2002Andreas

    Ein Skript extra-config ist dort vorhanden, sonst gäbe es ja keinen Tooltip wie auf dem Screenshot zu sehen ist.

    Richtig!;)

    Er schreibt auch immer nur "funktioniert nicht", meint er jetzt nur das fehlende Icon, oder generell das Script. :/

  • 1 Script funktioniert nicht mehr und ich weiss nicht, welches es von diesen 2 (Zusatzleisten) ist.

    • FuchsFan
    • 15. August 2026 um 09:00
    Zitat von omar1979

    im about:profiles habe ich 2 Profile.

    Das ist das Profil, das du verwendest:

    In dem ersten Script was du uns gezeigt hast (das ich auch angepasst habe) ist für das Icon das Profil c612nnc8.default-release angegeben, deswegen kann es nicht funktionieren. Öffne den Wurzelordner (siehe Bild) und schau nach, ob alle Scripte, die du im Einsatz hast, dort auch vorhanden sind. In dem extra-config-script musst du dann in Zeile 151 (nach /Profiles/xxxx) den richtigen Profilnamen eintragen (siehe Bild).

  • 1 Script funktioniert nicht mehr und ich weiss nicht, welches es von diesen 2 (Zusatzleisten) ist.

    • FuchsFan
    • 14. August 2026 um 22:08
    Zitat von omar1979

    muss ich hier was ändern, damit es funktioniert?

    Nein, denn das Script funktioniert von Version 153 bis 155. Jetzt noch einmal das Script mit dem richtigen Iconpfad. Sollte das Script nicht funktionieren bei dir, ja dann verstehe ich nur nicht was in deinem Profil passiert. Teste erst einmal:

    CSS
    // ==UserScript==
    // @name           extras_config_menu.uc.js
    // @compatibility  Firefox 5*.*
    // @include        main
    // @version        2.0.20260814
    // @description    Extra-Konfigurationsmenü ohne Inline-JavaScript und ohne eval
    // ==/UserScript==
    
    var uProfMenu = {
      /*
       * =========================
       * Beginn der Konfiguration
       * =========================
       */
    
      // Texteditor
      TextOpenExe: 'D:\\PortableProgramme\\Notepad++Portable_x64\\notepad++.exe',
      
      // Dateimanager:
      // Leer lassen, damit der Dateimanager des Systems verwendet wird.
      vFileManager: '',
    
      // Unterordner für userChromeJS-Scripte.
      // Leer lassen, wenn die Scripte direkt im Chrome-Ordner liegen.
      jsSubfolder: 'Scripte',
    
      /*
       * 'menu'  = Eintrag unter Extras
       * sonst   = ID des Elements, nach dem der Button eingefügt werden soll
       */
      warpmenuto: 'urlbar-container',
    
      // 1 = Sortierung erzwingen, 0 = keine Sortierung
      sortScripts: 0,
    
      /*
       * GM-Scripte:
       * 0 = nein
       * 1 = Greasemonkey
       * 2 = UserScriptLoader
       * 3 = Scriptish
       */
      gmOrdner: 0,
    
      // CSS-Ordner einbinden: 0 = nein, 1 = ja
      cssOrdner: 0,
    
      /*
       * Ordnernamen exakt an die tatsächlichen Ordnernamen anpassen.
       * Unter Linux ist Groß-/Kleinschreibung relevant.
       */
      cssFolderName: 'CSS',
      cssShadowFolderName: 'CSSShadow',
      cssWebFolderName: 'CSSWeb',
    
      // Aufzurufende about:-Seiten
      abouts: [
        'about:about',
        'about:debugging#/runtime/this-firefox',
        'about:cache',
        'about:config',
        'about:crashes',
        'about:downloads',
        'about:home',
        'about:logins',
        'about:memory',
        'about:support',
        'about:preferences',
        'about:performance',
        'about:profiles'
      ],
    
      // Normale Firefox-Einstellungen anzeigen
      showNormalPrefs: 0,
    
      /*
       * Skriptliste in die Zwischenablage:
       * 0 = nein
       * 1 = ohne Nummerierung
       * 2 = getrennte Nummerierung
       * 3 = gemeinsame Nummerierung
       */
      enableScriptsToClip: 1,
    
      // Neustart-Eintrag erzwingen
      enableRestart: 0,
    
      /*
       * =======================
       * Ende der Konfiguration
       * =======================
       */
    
    
      init: function() {
        var menu;
    
        if (this.warpmenuto.toLowerCase() == 'menu') {
          var zielmenu = document.getElementById('menu_ToolsPopup');
    
          if (!zielmenu) {
            if (typeof userChrome != 'undefined' && userChrome.log) {
              userChrome.log(
                'extras_config_menu.uc.js findet das Zielmenü nicht.'
              );
            }
            return;
          }
    
          menu = zielmenu.appendChild(
            this.createMenuElement(
              'menu',
              'Config Menü',
              'ExtraConfigMenu'
            )
          );
    
          menu.setAttribute('class', 'menu-iconic');
    
          menu.addEventListener('dblclick', function() {
            openTrustedLinkIn('about:config', 'tab');
          });
    
        } else {
          if (window.__SSi == 'window0') {
            CustomizableUI.createWidget({
              id: 'ExtraConfigMenu-button',
              defaultArea: CustomizableUI.AREA_NAVBAR,
              label: 'Extra Config Menü',
              tooltiptext: 'Extra Config Menü\nMittelklick öffnet about:config'
            });
          }
    
          menu = document.getElementById('ExtraConfigMenu-button');
    
          if (!menu) {
            return;
          }
    
          menu.setAttribute('type', 'menu');
    
          menu.addEventListener('click', function(event) {
            if (event.button == 1) {
              openTrustedLinkIn('about:config', 'tab');
            }
          });
        }
    
        var css =
          '#ExtraConfigMenu, #ExtraConfigMenu-button {' +
          '  list-style-image: url(file:///C:/Users/Ramo/AppData/Roaming/Mozilla/Firefox/Profiles/c612nnc8.default-release/chrome/Icons/extraConf.png);' +
          '}' +
          '#ExtraConfigMenu-button > dropmarker,' +
          '#ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker {' +
          '  display: none !important;' +
          '}';
    
        var sss = Cc[
          '@mozilla.org/content/style-sheet-service;1'
        ].getService(Ci.nsIStyleSheetService);
    
        var uri = Services.io.newURI(
          'data:text/css;charset=UTF-8,' + encodeURIComponent(css)
        );
    
        if (!sss.sheetRegistered(uri, sss.AGENT_SHEET)) {
          sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
        }
    
        menu.addEventListener('popupshowing', function() {
          uProfMenu.getScripts(0);
          uProfMenu.getCss(3);
          uProfMenu.getCss(4);
          uProfMenu.getCss(5);
        });
    
        var menupopup = menu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'ExtraConfigMenu-popup'
          )
        );
    
        /*
         * UserChromeJS-Scripte
         */
        var submenu = menupopup.appendChild(
          this.createMenuElement('menu', 'Scripte', 'submenu-ucjs')
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-ucjs-items'
          )
        );
    
        /*
         * CSS
         */
        submenu = menupopup.appendChild(
          this.createMenuElement('menu', 'CSS', 'submenu-css')
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-css-items'
          )
        );
    
        /*
         * CSSShadow
         */
        submenu = menupopup.appendChild(
          this.createMenuElement(
            'menu',
            'CSSShadow',
            'submenu-CSSShadow'
          )
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-CSSShadow-items'
          )
        );
    
        /*
         * CSSWeb
         */
        submenu = menupopup.appendChild(
          this.createMenuElement(
            'menu',
            'CSSWeb',
            'submenu-cssweb'
          )
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-cssweb-items'
          )
        );
    
        /*
         * about:-Seiten
         */
        if (this.abouts.length > 0) {
          menupopup.appendChild(document.createXULElement('menuseparator'));
    
          if (this.abouts[0] == '0') {
            for (var i = 1; i < this.abouts.length; i++) {
              menupopup.appendChild(
                this.createMenuItem(
                  this.abouts[i],
                  function(event) {
                    openTrustedLinkIn(
                      event.currentTarget.getAttribute('data-url'),
                      'tab'
                    );
                  },
                  'uProfMenu_about',
                  {
                    'data-url': this.abouts[i]
                  }
                )
              );
            }
          } else {
            submenu = menupopup.appendChild(
              this.createMenuElement(
                'menu',
                'about-Seiten',
                'submenu-about'
              )
            );
    
            submenu.appendChild(
              this.createMenuElement(
                'menupopup',
                '',
                'submenu-about-items'
              )
            );
    
            this.fillMenu(
              'submenu-about',
              'submenu-about-items',
              'about-Seiten',
              this.abouts,
              'uProfMenu_about',
              1
            );
          }
        }
    
        /*
         * Zwischenablage
         */
        if (this.enableScriptsToClip) {
          menupopup.appendChild(
            this.createMenuItem(
              'Scriptliste in Zwischenablage kopieren',
              function() {
                uProfMenu.getScripts(1);
              },
              'uProfMenu_clipboard'
            )
          );
        }
    
        menupopup.appendChild(
          document.createXULElement('menuseparator')
        );
    
        /*
         * Konfigurationsdateien
         */
        menupopup.appendChild(
          this.createMenuItem(
            'userChrome.css',
            function() {
              uProfMenu.edit(6, 'userChrome.css');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'userChromeShadow.css',
            function() {
              uProfMenu.edit(6, 'userChromeShadow.css');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'userContent.css',
            function() {
              uProfMenu.edit(6, 'userContent.css');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'userChrome.js',
            function() {
              uProfMenu.edit(6, 'userChrome.js');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'prefs.js',
            function() {
              uProfMenu.edit(1, 'prefs.js');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'user.js',
            function() {
              uProfMenu.edit(1, 'user.js');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          document.createXULElement('menuseparator')
        );
    
        /*
         * Ordner
         */
        switch (this.gmOrdner) {
          case 1:
            menupopup.appendChild(
              this.createMenuItem(
                'GM-Scripte',
                function() {
                  uProfMenu.dirOpen(
                    uProfMenu.getPrefDirectoryPath('ProfD') +
                    uProfMenu.getDirSep() +
                    'gm_scripts'
                  );
                },
                'uProfMenu_folder'
              )
            );
            break;
    
          case 2:
            menupopup.appendChild(
              this.createMenuItem(
                'USL-Scripte',
                function() {
                  uProfMenu.dirOpen(
                    uProfMenu.getPrefDirectoryPath('UChrm') +
                    uProfMenu.getDirSep() +
                    'UserScriptLoader'
                  );
                },
                'uProfMenu_folder'
              )
            );
            break;
    
          case 3:
            menupopup.appendChild(
              this.createMenuItem(
                'Scriptish-Scripte',
                function() {
                  uProfMenu.dirOpen(
                    uProfMenu.getPrefDirectoryPath('ProfD') +
                    uProfMenu.getDirSep() +
                    'scriptish_scripts'
                  );
                },
                'uProfMenu_folder'
              )
            );
            break;
        }
    
        menupopup.appendChild(
          this.createMenuItem(
            'Scripte-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.jsSubfolder
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'CSS-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.cssFolderName
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'CSSShadow-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.cssShadowFolderName
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'CSSWeb-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.cssWebFolderName
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Chrome-Ordner öffnen',
            function() {
              uProfMenu.prefDirOpen('UChrm');
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Profil-Ordner öffnen',
            function() {
              uProfMenu.prefDirOpen('ProfD');
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Icons-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                'Icons'
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Installations-Ordner öffnen',
            function() {
              uProfMenu.prefDirOpen('CurProcD');
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Add-ons-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('ProfD') +
                uProfMenu.getDirSep() +
                'extensions'
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Startup-Cache-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('ProfLD') +
                uProfMenu.getDirSep() +
                'startupCache'
              );
            },
            'uProfMenu_folder'
          )
        );
    
        /*
         * Normale Einstellungen
         */
        if (
          this.abouts.length == 0 &&
          (this.showNormalPrefs ||
           typeof ToolRstartMod != 'undefined')
        ) {
          menupopup.appendChild(
            document.createXULElement('menuseparator')
          );
        }
    
        if (this.showNormalPrefs) {
          menupopup.appendChild(
            this.createMenuItem(
              'Einstellungen',
              function() {
                try {
                  openOptionsDialog();
                } catch (e) {
                  openPreferences();
                }
              },
              'uProfMenu_prefs'
            )
          );
        }
    
        /*
         * Neustart
         */
        if (
          typeof ToolRstartMod != 'undefined' ||
          this.enableRestart
        ) {
          menupopup.appendChild(
            this.createMenuItem(
              'Neustart',
              function() {
                try {
                  ToolRstartMod.restartApp(false);
                } catch (e) {
                  alert(e);
                }
              },
              'uProfMenu_restart'
            )
          );
        }
      },
    
    
      getDirSep: function() {
        var osString = Services.appinfo.OS;
    
        switch (osString) {
          case 'WINNT':
            return '\\';
    
          case 'Linux':
          case 'Darwin':
          default:
            return '/';
        }
      },
    
    
      edit: function(openMode, filename) {
        var dSep = this.getDirSep();
        var path;
    
        switch (openMode) {
          case 0:
            path = this.getPrefDirectoryPath('UChrm');
    
            if (this.jsSubfolder.length != 0) {
              path += dSep + this.jsSubfolder;
            }
    
            path += dSep + filename;
            break;
    
          case 1:
            path =
              this.getPrefDirectoryPath('ProfD') +
              dSep +
              filename;
            break;
    
          case 2:
            path = filename;
            break;
    
          case 3:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              this.cssFolderName +
              dSep +
              filename;
            break;
    
          case 4:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              this.cssWebFolderName +
              dSep +
              filename;
            break;
    
          case 5:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              this.cssShadowFolderName +
              dSep +
              filename;
            break;
    
          case 6:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              filename;
            break;
    
          default:
            return;
        }
    
        this.launch(this.TextOpenExe, path);
      },
    
    
      dirOpen: function(path) {
        if (this.vFileManager.length != 0) {
          var file = Cc[
            '@mozilla.org/file/local;1'
          ].createInstance(Ci.nsIFile);
    
          var process = Cc[
            '@mozilla.org/process/util;1'
          ].createInstance(Ci.nsIProcess);
    
          file.initWithPath(this.vFileManager);
          process.init(file);
    
          var args = [path];
          process.run(false, args, args.length);
        } else {
          var dir = Cc[
            '@mozilla.org/file/local;1'
          ].createInstance(Ci.nsIFile);
    
          dir.initWithPath(path);
          dir.launch();
        }
      },
    
    
      prefDirOpen: function(prefDir) {
        var path = this.getPrefDirectoryPath(prefDir);
        this.dirOpen(path);
      },
    
    
      getPrefDirectoryPath: function(prefDir) {
        var file = Services.dirsvc.get(prefDir, Ci.nsIFile);
    
        if (prefDir == 'CurProcD') {
          file = file.parent;
        }
    
        return file.path;
      },
    
    
      launch: function(editorPath, filePath) {
        var file = Cc[
          '@mozilla.org/file/local;1'
        ].createInstance(Ci.nsIFile);
    
        var process = Cc[
          '@mozilla.org/process/util;1'
        ].createInstance(Ci.nsIProcess);
    
        file.initWithPath(editorPath);
    
        /*
         * Falls der konfigurierte Editor nicht existiert,
         * view_source.editor.path verwenden.
         */
        if (!file.exists()) {
          try {
            editorPath = Services.prefs.getStringPref(
              'view_source.editor.path'
            );
          } catch (e) {
            alert(
              'Editor nicht gefunden und view_source.editor.path ist nicht gesetzt.'
            );
            return;
          }
    
          file.initWithPath(editorPath);
        }
    
        if (!file.exists()) {
          alert('Editor nicht gefunden:\n' + editorPath);
          return;
        }
    
        process.init(file);
    
        var args = [filePath];
        process.run(false, args, args.length);
      },
    
    
      stringComparison: function(a, b) {
        function normalize(value) {
          return value
            .toLowerCase()
            .replace(/ä/g, 'a')
            .replace(/ö/g, 'o')
            .replace(/ü/g, 'u')
            .replace(/ß/g, 's');
        }
    
        a = normalize(a);
        b = normalize(b);
    
        return a == b ? 0 : a > b ? 1 : -1;
      },
    
    
      getScripts: function(type) {
        var ucJsScripts = [];
        var folderPath = Services.dirsvc.get(
          'UChrm',
          Ci.nsIFile
        ).path;
    
        if (this.jsSubfolder.length != 0) {
          folderPath +=
            this.getDirSep() +
            this.jsSubfolder;
        }
    
        var folder = Cc[
          '@mozilla.org/file/local;1'
        ].createInstance(Ci.nsIFile);
    
        folder.initWithPath(folderPath);
    
        if (folder.exists() && folder.isDirectory()) {
          var files = folder.directoryEntries;
    
          while (files.hasMoreElements()) {
            var file = files
              .getNext()
              .QueryInterface(Ci.nsIFile);
    
            if (/\.uc\.js$/i.test(file.leafName)) {
              ucJsScripts.push(file.leafName);
            }
          }
        }
    
        if (this.sortScripts) {
          ucJsScripts.sort(this.stringComparison);
        }
    
        if (type == 0) {
          this.fillMenu(
            'submenu-ucjs',
            'submenu-ucjs-items',
            'Meine Scripte',
            ucJsScripts,
            'uProfMenu_ucjs',
            0
          );
        } else {
          var result = this.fillClipboardValue(
            ucJsScripts,
            []
          );
    
          Cc[
            '@mozilla.org/widget/clipboardhelper;1'
          ].getService(Ci.nsIClipboardHelper).copyString(result);
        }
      },
    
    
      getCss: function(type) {
        var cssFiles = [];
        var folderName;
    
        switch (type) {
          case 3:
            folderName = this.cssFolderName;
            break;
    
          case 4:
            folderName = this.cssWebFolderName;
            break;
    
          case 5:
            folderName = this.cssShadowFolderName;
            break;
    
          default:
            return;
        }
    
        var folderPath =
          Services.dirsvc.get('UChrm', Ci.nsIFile).path +
          this.getDirSep() +
          folderName;
    
        var folder = Cc[
          '@mozilla.org/file/local;1'
        ].createInstance(Ci.nsIFile);
    
        folder.initWithPath(folderPath);
    
        if (folder.exists() && folder.isDirectory()) {
          var files = folder.directoryEntries;
    
          while (files.hasMoreElements()) {
            var file = files
              .getNext()
              .QueryInterface(Ci.nsIFile);
    
            if (/\.css$/i.test(file.leafName)) {
              cssFiles.push(file.leafName);
            }
          }
        }
    
        if (this.sortScripts) {
          cssFiles.sort(this.stringComparison);
        }
    
        if (type == 3) {
          this.fillMenu(
            'submenu-css',
            'submenu-css-items',
            'Meine CSS-Dateien',
            cssFiles,
            'uProfMenu_css',
            3
          );
        } else if (type == 4) {
          this.fillMenu(
            'submenu-cssweb',
            'submenu-cssweb-items',
            'Meine CSSWeb-Dateien',
            cssFiles,
            'uProfMenu_css',
            4
          );
        } else if (type == 5) {
          this.fillMenu(
            'submenu-CSSShadow',
            'submenu-CSSShadow-items',
            'Meine CSSShadow-Dateien',
            cssFiles,
            'uProfMenu_css',
            5
          );
        }
      },
    
    
      fillMenu: function(
        submenuId,
        submenuItemsId,
        label,
        fileArray,
        itemClass,
        type
      ) {
        var submenu = document.getElementById(submenuId);
        var popup = document.getElementById(submenuItemsId);
    
        if (!submenu || !popup) {
          return;
        }
    
        submenu.setAttribute(
          'label',
          label + ' (' + fileArray.length + ')'
        );
    
        while (popup.firstChild) {
          popup.removeChild(popup.firstChild);
        }
    
        for (var i = fileArray.length - 1; i >= 0; i--) {
          var filename = fileArray[i];
          var menuitem;
    
          if (type == 0) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                var name =
                  event.currentTarget.getAttribute('data-filename');
    
                if (event.button == 1) {
                  uProfMenu.openAtGithub(event, name);
                } else if (event.button == 2) {
                  uProfMenu.openAtGithub(event, name);
                }
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
    
            menuitem.setAttribute(
              'tooltiptext',
              'Linksklick: Bearbeiten\n' +
              'Mittelklick: GitHub öffnen\n' +
              'Rechtsklick: Suche auf GitHub'
            );
    
            menuitem.addEventListener('command', function(event) {
              uProfMenu.edit(
                0,
                event.currentTarget.getAttribute('data-filename')
              );
            });
    
          } else if (type == 1) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                openTrustedLinkIn(
                  event.currentTarget.getAttribute('data-url'),
                  'tab'
                );
              },
              itemClass,
              {
                'data-url': filename
              }
            );
    
          } else if (type == 3) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                uProfMenu.edit(
                  3,
                  event.currentTarget.getAttribute('data-filename')
                );
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
    
          } else if (type == 4) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                uProfMenu.edit(
                  4,
                  event.currentTarget.getAttribute('data-filename')
                );
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
    
          } else if (type == 5) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                uProfMenu.edit(
                  5,
                  event.currentTarget.getAttribute('data-filename')
                );
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
          }
    
          if (menuitem) {
            popup.insertBefore(menuitem, popup.firstChild);
          }
        }
      },
    
    
      fillClipboardValue: function(scriptArray, xulArray) {
        var scriptCount = scriptArray.length;
        var xulCount = xulArray.length;
        var result;
    
        switch (this.enableScriptsToClip) {
          case 1:
            result =
              'userChromeJS/uc.js (' +
              scriptCount +
              '):\n' +
              '------------------------\n' +
              scriptArray.join('\n') +
              '\n\n' +
              'userChromeJS/uc.xul (' +
              xulCount +
              '):\n' +
              '-------------------------\n' +
              xulArray.join('\n');
            break;
    
          case 2:
          case 3:
            result =
              'userChromeJS/uc.js (' +
              scriptCount +
              '):\n' +
              '------------------------';
    
            for (var i = 0; i < scriptCount; i++) {
              result += '\n' + (i + 1) + '. ' + scriptArray[i];
            }
    
            result +=
              '\n\nuserChromeJS/uc.xul (' +
              xulCount +
              '):\n' +
              '-------------------------';
    
            for (var j = 0; j < xulCount; j++) {
              var number = j + 1;
    
              if (this.enableScriptsToClip == 3) {
                number += scriptCount;
              }
    
              result += '\n' + number + '. ' + xulArray[j];
            }
            break;
    
          default:
            result = '';
        }
    
        return result;
      },
    
    
      createMenuElement: function(type, label, id) {
        var element = document.createXULElement(type);
    
        if (label) {
          element.setAttribute('label', label);
        }
    
        if (id) {
          element.setAttribute('id', id);
        }
    
        return element;
      },
    
    
      createMenuItem: function(label, callback, className, attributes) {
        var item = document.createXULElement('menuitem');
    
        item.setAttribute('label', label);
    
        if (className) {
          item.setAttribute('class', className);
        }
    
        if (attributes) {
          for (var name in attributes) {
            item.setAttribute(name, attributes[name]);
          }
        }
    
        /*
         * Kein oncommand-Attribut und kein Inline-JavaScript:
         * Die Funktion wird direkt als Event-Listener registriert.
         */
        item.addEventListener('command', callback);
    
        /*
         * Für Mittelklick und Rechtsklick wird zusätzlich das click-Event
         * verwendet. Der normale Linksklick läuft über command.
         */
        item.addEventListener('click', callback);
    
        return item;
      },
    
    
      openAtGithub: function(event, scriptName) {
        if (event.button == 1) {
          var githubUrl =
            'https://github.com/ardiman/userChrome.js/tree/master/' +
            this.cleanFileName(scriptName);
    
          openWebLinkIn(githubUrl, 'tab');
    
        } else if (event.button == 2) {
          event.preventDefault();
    
          var searchUrl =
            'https://github.com/search?langOverride=&language=&q=' +
            encodeURIComponent(scriptName) +
            '&repo=&start_value=1&type=Code';
    
          openWebLinkIn(searchUrl, 'tab');
        }
      },
    
    
      cleanFileName: function(name) {
        name = name.toLowerCase();
    
        var expressions = [
          /\.uc\.js$/,
          /\.uc\.xul$/,
          /^ucjs_/,
          /_\d.+/,
          /_fx\d+/,
          /[-+\.]/g,
          /_v\d+/
        ];
    
        for (var i = 0; i < expressions.length; i++) {
          name = name.replace(expressions[i], '');
        }
    
        return name;
      }
    };
    
    
    /*
     * Script starten
     */
    uProfMenu.init();
    Alles anzeigen
  • 1 Script funktioniert nicht mehr und ich weiss nicht, welches es von diesen 2 (Zusatzleisten) ist.

    • FuchsFan
    • 14. August 2026 um 20:13
    Zitat von omar1979

    ich benütze dieses Script, funktioniert aber nicht, zeigt kein icon an, nur das Feld dafür ist leer und auf klick passiert aucht nichts.

    Deswegen teste erst einmal das Script aus dem Beitrag darüber, ob es bei dir funktioniert. Über das Icon reden wir dann danach.

  • 1 Script funktioniert nicht mehr und ich weiss nicht, welches es von diesen 2 (Zusatzleisten) ist.

    • FuchsFan
    • 14. August 2026 um 20:04

    omar1979

    Ich habe jetzt mal dein Script von hier erneuert, es funktioniert hier in Version 155, probiere es aus. Wenn du dann doch ein anderes nutzt, dann stelle es hier rein, werde dir dabei helfen wenn du möchtest. Hier erst einmal das Script (funktioniert ohne eval-Schalter).

    CSS
    // ==UserScript==
    // @name           extras_config_menu.uc.js
    // @compatibility  Firefox 5*.*
    // @include        main
    // @version        2.0.20260814
    // @description    Extra-Konfigurationsmenü ohne Inline-JavaScript und ohne eval
    // ==/UserScript==
    
    var uProfMenu = {
      /*
       * =========================
       * Beginn der Konfiguration
       * =========================
       */
    
      // Texteditor
      TextOpenExe: 'D:\\PortableProgramme\\Notepad++Portable_x64\\notepad++.exe',
    
      // Dateimanager:
      // Leer lassen, damit der Dateimanager des Systems verwendet wird.
      vFileManager: '',
    
      // Unterordner für userChromeJS-Scripte.
      // Leer lassen, wenn die Scripte direkt im Chrome-Ordner liegen.
      jsSubfolder: 'Scripte',
    
      /*
       * 'menu'  = Eintrag unter Extras
       * sonst   = ID des Elements, nach dem der Button eingefügt werden soll
       */
      warpmenuto: 'urlbar-container',
    
      // 1 = Sortierung erzwingen, 0 = keine Sortierung
      sortScripts: 0,
    
      /*
       * GM-Scripte:
       * 0 = nein
       * 1 = Greasemonkey
       * 2 = UserScriptLoader
       * 3 = Scriptish
       */
      gmOrdner: 0,
    
      // CSS-Ordner einbinden: 0 = nein, 1 = ja
      cssOrdner: 0,
    
      /*
       * Ordnernamen exakt an die tatsächlichen Ordnernamen anpassen.
       * Unter Linux ist Groß-/Kleinschreibung relevant.
       */
      cssFolderName: 'CSS',
      cssShadowFolderName: 'CSSShadow',
      cssWebFolderName: 'CSSWeb',
    
      // Aufzurufende about:-Seiten
      abouts: [
        'about:about',
        'about:debugging#/runtime/this-firefox',
        'about:cache',
        'about:config',
        'about:crashes',
        'about:downloads',
        'about:home',
        'about:logins',
        'about:memory',
        'about:support',
        'about:preferences',
        'about:performance',
        'about:profiles'
      ],
    
      // Normale Firefox-Einstellungen anzeigen
      showNormalPrefs: 0,
    
      /*
       * Skriptliste in die Zwischenablage:
       * 0 = nein
       * 1 = ohne Nummerierung
       * 2 = getrennte Nummerierung
       * 3 = gemeinsame Nummerierung
       */
      enableScriptsToClip: 1,
    
      // Neustart-Eintrag erzwingen
      enableRestart: 0,
    
      /*
       * =======================
       * Ende der Konfiguration
       * =======================
       */
    
    
      init: function() {
        var menu;
    
        if (this.warpmenuto.toLowerCase() == 'menu') {
          var zielmenu = document.getElementById('menu_ToolsPopup');
    
          if (!zielmenu) {
            if (typeof userChrome != 'undefined' && userChrome.log) {
              userChrome.log(
                'extras_config_menu.uc.js findet das Zielmenü nicht.'
              );
            }
            return;
          }
    
          menu = zielmenu.appendChild(
            this.createMenuElement(
              'menu',
              'Config Menü',
              'ExtraConfigMenu'
            )
          );
    
          menu.setAttribute('class', 'menu-iconic');
    
          menu.addEventListener('dblclick', function() {
            openTrustedLinkIn('about:config', 'tab');
          });
    
        } else {
          if (window.__SSi == 'window0') {
            CustomizableUI.createWidget({
              id: 'ExtraConfigMenu-button',
              defaultArea: CustomizableUI.AREA_NAVBAR,
              label: 'Extra Config Menü',
              tooltiptext: 'Extra Config Menü\nMittelklick öffnet about:config'
            });
          }
    
          menu = document.getElementById('ExtraConfigMenu-button');
    
          if (!menu) {
            return;
          }
    
          menu.setAttribute('type', 'menu');
    
          menu.addEventListener('click', function(event) {
            if (event.button == 1) {
              openTrustedLinkIn('about:config', 'tab');
            }
          });
        }
    
        var css =
          '#ExtraConfigMenu, #ExtraConfigMenu-button {' +
          '  list-style-image: url(file:///C:/Users/Ramo/AppData/Roaming/' +
          'Mozilla/Firefox/Profiles/c612nnc8.default-release/chrome/Icons/extraConf.png);' +
          '}' +
          '#ExtraConfigMenu-button > dropmarker,' +
          '#ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker {' +
          '  display: none !important;' +
          '}';
    
        var sss = Cc[
          '@mozilla.org/content/style-sheet-service;1'
        ].getService(Ci.nsIStyleSheetService);
    
        var uri = Services.io.newURI(
          'data:text/css;charset=UTF-8,' + encodeURIComponent(css)
        );
    
        if (!sss.sheetRegistered(uri, sss.AGENT_SHEET)) {
          sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
        }
    
        menu.addEventListener('popupshowing', function() {
          uProfMenu.getScripts(0);
          uProfMenu.getCss(3);
          uProfMenu.getCss(4);
          uProfMenu.getCss(5);
        });
    
        var menupopup = menu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'ExtraConfigMenu-popup'
          )
        );
    
        /*
         * UserChromeJS-Scripte
         */
        var submenu = menupopup.appendChild(
          this.createMenuElement('menu', 'Scripte', 'submenu-ucjs')
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-ucjs-items'
          )
        );
    
        /*
         * CSS
         */
        submenu = menupopup.appendChild(
          this.createMenuElement('menu', 'CSS', 'submenu-css')
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-css-items'
          )
        );
    
        /*
         * CSSShadow
         */
        submenu = menupopup.appendChild(
          this.createMenuElement(
            'menu',
            'CSSShadow',
            'submenu-CSSShadow'
          )
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-CSSShadow-items'
          )
        );
    
        /*
         * CSSWeb
         */
        submenu = menupopup.appendChild(
          this.createMenuElement(
            'menu',
            'CSSWeb',
            'submenu-cssweb'
          )
        );
    
        submenu.appendChild(
          this.createMenuElement(
            'menupopup',
            '',
            'submenu-cssweb-items'
          )
        );
    
        /*
         * about:-Seiten
         */
        if (this.abouts.length > 0) {
          menupopup.appendChild(document.createXULElement('menuseparator'));
    
          if (this.abouts[0] == '0') {
            for (var i = 1; i < this.abouts.length; i++) {
              menupopup.appendChild(
                this.createMenuItem(
                  this.abouts[i],
                  function(event) {
                    openTrustedLinkIn(
                      event.currentTarget.getAttribute('data-url'),
                      'tab'
                    );
                  },
                  'uProfMenu_about',
                  {
                    'data-url': this.abouts[i]
                  }
                )
              );
            }
          } else {
            submenu = menupopup.appendChild(
              this.createMenuElement(
                'menu',
                'about-Seiten',
                'submenu-about'
              )
            );
    
            submenu.appendChild(
              this.createMenuElement(
                'menupopup',
                '',
                'submenu-about-items'
              )
            );
    
            this.fillMenu(
              'submenu-about',
              'submenu-about-items',
              'about-Seiten',
              this.abouts,
              'uProfMenu_about',
              1
            );
          }
        }
    
        /*
         * Zwischenablage
         */
        if (this.enableScriptsToClip) {
          menupopup.appendChild(
            this.createMenuItem(
              'Scriptliste in Zwischenablage kopieren',
              function() {
                uProfMenu.getScripts(1);
              },
              'uProfMenu_clipboard'
            )
          );
        }
    
        menupopup.appendChild(
          document.createXULElement('menuseparator')
        );
    
        /*
         * Konfigurationsdateien
         */
        menupopup.appendChild(
          this.createMenuItem(
            'userChrome.css',
            function() {
              uProfMenu.edit(6, 'userChrome.css');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'userChromeShadow.css',
            function() {
              uProfMenu.edit(6, 'userChromeShadow.css');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'userContent.css',
            function() {
              uProfMenu.edit(6, 'userContent.css');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'userChrome.js',
            function() {
              uProfMenu.edit(6, 'userChrome.js');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'prefs.js',
            function() {
              uProfMenu.edit(1, 'prefs.js');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'user.js',
            function() {
              uProfMenu.edit(1, 'user.js');
            },
            'uProfMenu_edit'
          )
        );
    
        menupopup.appendChild(
          document.createXULElement('menuseparator')
        );
    
        /*
         * Ordner
         */
        switch (this.gmOrdner) {
          case 1:
            menupopup.appendChild(
              this.createMenuItem(
                'GM-Scripte',
                function() {
                  uProfMenu.dirOpen(
                    uProfMenu.getPrefDirectoryPath('ProfD') +
                    uProfMenu.getDirSep() +
                    'gm_scripts'
                  );
                },
                'uProfMenu_folder'
              )
            );
            break;
    
          case 2:
            menupopup.appendChild(
              this.createMenuItem(
                'USL-Scripte',
                function() {
                  uProfMenu.dirOpen(
                    uProfMenu.getPrefDirectoryPath('UChrm') +
                    uProfMenu.getDirSep() +
                    'UserScriptLoader'
                  );
                },
                'uProfMenu_folder'
              )
            );
            break;
    
          case 3:
            menupopup.appendChild(
              this.createMenuItem(
                'Scriptish-Scripte',
                function() {
                  uProfMenu.dirOpen(
                    uProfMenu.getPrefDirectoryPath('ProfD') +
                    uProfMenu.getDirSep() +
                    'scriptish_scripts'
                  );
                },
                'uProfMenu_folder'
              )
            );
            break;
        }
    
        menupopup.appendChild(
          this.createMenuItem(
            'Scripte-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.jsSubfolder
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'CSS-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.cssFolderName
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'CSSShadow-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.cssShadowFolderName
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'CSSWeb-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                uProfMenu.cssWebFolderName
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Chrome-Ordner öffnen',
            function() {
              uProfMenu.prefDirOpen('UChrm');
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Profil-Ordner öffnen',
            function() {
              uProfMenu.prefDirOpen('ProfD');
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Icons-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('UChrm') +
                uProfMenu.getDirSep() +
                'Icons'
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Installations-Ordner öffnen',
            function() {
              uProfMenu.prefDirOpen('CurProcD');
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Add-ons-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('ProfD') +
                uProfMenu.getDirSep() +
                'extensions'
              );
            },
            'uProfMenu_folder'
          )
        );
    
        menupopup.appendChild(
          this.createMenuItem(
            'Startup-Cache-Ordner öffnen',
            function() {
              uProfMenu.dirOpen(
                uProfMenu.getPrefDirectoryPath('ProfLD') +
                uProfMenu.getDirSep() +
                'startupCache'
              );
            },
            'uProfMenu_folder'
          )
        );
    
        /*
         * Normale Einstellungen
         */
        if (
          this.abouts.length == 0 &&
          (this.showNormalPrefs ||
           typeof ToolRstartMod != 'undefined')
        ) {
          menupopup.appendChild(
            document.createXULElement('menuseparator')
          );
        }
    
        if (this.showNormalPrefs) {
          menupopup.appendChild(
            this.createMenuItem(
              'Einstellungen',
              function() {
                try {
                  openOptionsDialog();
                } catch (e) {
                  openPreferences();
                }
              },
              'uProfMenu_prefs'
            )
          );
        }
    
        /*
         * Neustart
         */
        if (
          typeof ToolRstartMod != 'undefined' ||
          this.enableRestart
        ) {
          menupopup.appendChild(
            this.createMenuItem(
              'Neustart',
              function() {
                try {
                  ToolRstartMod.restartApp(false);
                } catch (e) {
                  alert(e);
                }
              },
              'uProfMenu_restart'
            )
          );
        }
      },
    
    
      getDirSep: function() {
        var osString = Services.appinfo.OS;
    
        switch (osString) {
          case 'WINNT':
            return '\\';
    
          case 'Linux':
          case 'Darwin':
          default:
            return '/';
        }
      },
    
    
      edit: function(openMode, filename) {
        var dSep = this.getDirSep();
        var path;
    
        switch (openMode) {
          case 0:
            path = this.getPrefDirectoryPath('UChrm');
    
            if (this.jsSubfolder.length != 0) {
              path += dSep + this.jsSubfolder;
            }
    
            path += dSep + filename;
            break;
    
          case 1:
            path =
              this.getPrefDirectoryPath('ProfD') +
              dSep +
              filename;
            break;
    
          case 2:
            path = filename;
            break;
    
          case 3:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              this.cssFolderName +
              dSep +
              filename;
            break;
    
          case 4:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              this.cssWebFolderName +
              dSep +
              filename;
            break;
    
          case 5:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              this.cssShadowFolderName +
              dSep +
              filename;
            break;
    
          case 6:
            path =
              this.getPrefDirectoryPath('UChrm') +
              dSep +
              filename;
            break;
    
          default:
            return;
        }
    
        this.launch(this.TextOpenExe, path);
      },
    
    
      dirOpen: function(path) {
        if (this.vFileManager.length != 0) {
          var file = Cc[
            '@mozilla.org/file/local;1'
          ].createInstance(Ci.nsIFile);
    
          var process = Cc[
            '@mozilla.org/process/util;1'
          ].createInstance(Ci.nsIProcess);
    
          file.initWithPath(this.vFileManager);
          process.init(file);
    
          var args = [path];
          process.run(false, args, args.length);
        } else {
          var dir = Cc[
            '@mozilla.org/file/local;1'
          ].createInstance(Ci.nsIFile);
    
          dir.initWithPath(path);
          dir.launch();
        }
      },
    
    
      prefDirOpen: function(prefDir) {
        var path = this.getPrefDirectoryPath(prefDir);
        this.dirOpen(path);
      },
    
    
      getPrefDirectoryPath: function(prefDir) {
        var file = Services.dirsvc.get(prefDir, Ci.nsIFile);
    
        if (prefDir == 'CurProcD') {
          file = file.parent;
        }
    
        return file.path;
      },
    
    
      launch: function(editorPath, filePath) {
        var file = Cc[
          '@mozilla.org/file/local;1'
        ].createInstance(Ci.nsIFile);
    
        var process = Cc[
          '@mozilla.org/process/util;1'
        ].createInstance(Ci.nsIProcess);
    
        file.initWithPath(editorPath);
    
        /*
         * Falls der konfigurierte Editor nicht existiert,
         * view_source.editor.path verwenden.
         */
        if (!file.exists()) {
          try {
            editorPath = Services.prefs.getStringPref(
              'view_source.editor.path'
            );
          } catch (e) {
            alert(
              'Editor nicht gefunden und view_source.editor.path ist nicht gesetzt.'
            );
            return;
          }
    
          file.initWithPath(editorPath);
        }
    
        if (!file.exists()) {
          alert('Editor nicht gefunden:\n' + editorPath);
          return;
        }
    
        process.init(file);
    
        var args = [filePath];
        process.run(false, args, args.length);
      },
    
    
      stringComparison: function(a, b) {
        function normalize(value) {
          return value
            .toLowerCase()
            .replace(/ä/g, 'a')
            .replace(/ö/g, 'o')
            .replace(/ü/g, 'u')
            .replace(/ß/g, 's');
        }
    
        a = normalize(a);
        b = normalize(b);
    
        return a == b ? 0 : a > b ? 1 : -1;
      },
    
    
      getScripts: function(type) {
        var ucJsScripts = [];
        var folderPath = Services.dirsvc.get(
          'UChrm',
          Ci.nsIFile
        ).path;
    
        if (this.jsSubfolder.length != 0) {
          folderPath +=
            this.getDirSep() +
            this.jsSubfolder;
        }
    
        var folder = Cc[
          '@mozilla.org/file/local;1'
        ].createInstance(Ci.nsIFile);
    
        folder.initWithPath(folderPath);
    
        if (folder.exists() && folder.isDirectory()) {
          var files = folder.directoryEntries;
    
          while (files.hasMoreElements()) {
            var file = files
              .getNext()
              .QueryInterface(Ci.nsIFile);
    
            if (/\.uc\.js$/i.test(file.leafName)) {
              ucJsScripts.push(file.leafName);
            }
          }
        }
    
        if (this.sortScripts) {
          ucJsScripts.sort(this.stringComparison);
        }
    
        if (type == 0) {
          this.fillMenu(
            'submenu-ucjs',
            'submenu-ucjs-items',
            'Meine Scripte',
            ucJsScripts,
            'uProfMenu_ucjs',
            0
          );
        } else {
          var result = this.fillClipboardValue(
            ucJsScripts,
            []
          );
    
          Cc[
            '@mozilla.org/widget/clipboardhelper;1'
          ].getService(Ci.nsIClipboardHelper).copyString(result);
        }
      },
    
    
      getCss: function(type) {
        var cssFiles = [];
        var folderName;
    
        switch (type) {
          case 3:
            folderName = this.cssFolderName;
            break;
    
          case 4:
            folderName = this.cssWebFolderName;
            break;
    
          case 5:
            folderName = this.cssShadowFolderName;
            break;
    
          default:
            return;
        }
    
        var folderPath =
          Services.dirsvc.get('UChrm', Ci.nsIFile).path +
          this.getDirSep() +
          folderName;
    
        var folder = Cc[
          '@mozilla.org/file/local;1'
        ].createInstance(Ci.nsIFile);
    
        folder.initWithPath(folderPath);
    
        if (folder.exists() && folder.isDirectory()) {
          var files = folder.directoryEntries;
    
          while (files.hasMoreElements()) {
            var file = files
              .getNext()
              .QueryInterface(Ci.nsIFile);
    
            if (/\.css$/i.test(file.leafName)) {
              cssFiles.push(file.leafName);
            }
          }
        }
    
        if (this.sortScripts) {
          cssFiles.sort(this.stringComparison);
        }
    
        if (type == 3) {
          this.fillMenu(
            'submenu-css',
            'submenu-css-items',
            'Meine CSS-Dateien',
            cssFiles,
            'uProfMenu_css',
            3
          );
        } else if (type == 4) {
          this.fillMenu(
            'submenu-cssweb',
            'submenu-cssweb-items',
            'Meine CSSWeb-Dateien',
            cssFiles,
            'uProfMenu_css',
            4
          );
        } else if (type == 5) {
          this.fillMenu(
            'submenu-CSSShadow',
            'submenu-CSSShadow-items',
            'Meine CSSShadow-Dateien',
            cssFiles,
            'uProfMenu_css',
            5
          );
        }
      },
    
    
      fillMenu: function(
        submenuId,
        submenuItemsId,
        label,
        fileArray,
        itemClass,
        type
      ) {
        var submenu = document.getElementById(submenuId);
        var popup = document.getElementById(submenuItemsId);
    
        if (!submenu || !popup) {
          return;
        }
    
        submenu.setAttribute(
          'label',
          label + ' (' + fileArray.length + ')'
        );
    
        while (popup.firstChild) {
          popup.removeChild(popup.firstChild);
        }
    
        for (var i = fileArray.length - 1; i >= 0; i--) {
          var filename = fileArray[i];
          var menuitem;
    
          if (type == 0) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                var name =
                  event.currentTarget.getAttribute('data-filename');
    
                if (event.button == 1) {
                  uProfMenu.openAtGithub(event, name);
                } else if (event.button == 2) {
                  uProfMenu.openAtGithub(event, name);
                }
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
    
            menuitem.setAttribute(
              'tooltiptext',
              'Linksklick: Bearbeiten\n' +
              'Mittelklick: GitHub öffnen\n' +
              'Rechtsklick: Suche auf GitHub'
            );
    
            menuitem.addEventListener('command', function(event) {
              uProfMenu.edit(
                0,
                event.currentTarget.getAttribute('data-filename')
              );
            });
    
          } else if (type == 1) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                openTrustedLinkIn(
                  event.currentTarget.getAttribute('data-url'),
                  'tab'
                );
              },
              itemClass,
              {
                'data-url': filename
              }
            );
    
          } else if (type == 3) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                uProfMenu.edit(
                  3,
                  event.currentTarget.getAttribute('data-filename')
                );
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
    
          } else if (type == 4) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                uProfMenu.edit(
                  4,
                  event.currentTarget.getAttribute('data-filename')
                );
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
    
          } else if (type == 5) {
            menuitem = this.createMenuItem(
              filename,
              function(event) {
                uProfMenu.edit(
                  5,
                  event.currentTarget.getAttribute('data-filename')
                );
              },
              itemClass,
              {
                'data-filename': filename
              }
            );
          }
    
          if (menuitem) {
            popup.insertBefore(menuitem, popup.firstChild);
          }
        }
      },
    
    
      fillClipboardValue: function(scriptArray, xulArray) {
        var scriptCount = scriptArray.length;
        var xulCount = xulArray.length;
        var result;
    
        switch (this.enableScriptsToClip) {
          case 1:
            result =
              'userChromeJS/uc.js (' +
              scriptCount +
              '):\n' +
              '------------------------\n' +
              scriptArray.join('\n') +
              '\n\n' +
              'userChromeJS/uc.xul (' +
              xulCount +
              '):\n' +
              '-------------------------\n' +
              xulArray.join('\n');
            break;
    
          case 2:
          case 3:
            result =
              'userChromeJS/uc.js (' +
              scriptCount +
              '):\n' +
              '------------------------';
    
            for (var i = 0; i < scriptCount; i++) {
              result += '\n' + (i + 1) + '. ' + scriptArray[i];
            }
    
            result +=
              '\n\nuserChromeJS/uc.xul (' +
              xulCount +
              '):\n' +
              '-------------------------';
    
            for (var j = 0; j < xulCount; j++) {
              var number = j + 1;
    
              if (this.enableScriptsToClip == 3) {
                number += scriptCount;
              }
    
              result += '\n' + number + '. ' + xulArray[j];
            }
            break;
    
          default:
            result = '';
        }
    
        return result;
      },
    
    
      createMenuElement: function(type, label, id) {
        var element = document.createXULElement(type);
    
        if (label) {
          element.setAttribute('label', label);
        }
    
        if (id) {
          element.setAttribute('id', id);
        }
    
        return element;
      },
    
    
      createMenuItem: function(label, callback, className, attributes) {
        var item = document.createXULElement('menuitem');
    
        item.setAttribute('label', label);
    
        if (className) {
          item.setAttribute('class', className);
        }
    
        if (attributes) {
          for (var name in attributes) {
            item.setAttribute(name, attributes[name]);
          }
        }
    
        /*
         * Kein oncommand-Attribut und kein Inline-JavaScript:
         * Die Funktion wird direkt als Event-Listener registriert.
         */
        item.addEventListener('command', callback);
    
        /*
         * Für Mittelklick und Rechtsklick wird zusätzlich das click-Event
         * verwendet. Der normale Linksklick läuft über command.
         */
        item.addEventListener('click', callback);
    
        return item;
      },
    
    
      openAtGithub: function(event, scriptName) {
        if (event.button == 1) {
          var githubUrl =
            'https://github.com/ardiman/userChrome.js/tree/master/' +
            this.cleanFileName(scriptName);
    
          openWebLinkIn(githubUrl, 'tab');
    
        } else if (event.button == 2) {
          event.preventDefault();
    
          var searchUrl =
            'https://github.com/search?langOverride=&language=&q=' +
            encodeURIComponent(scriptName) +
            '&repo=&start_value=1&type=Code';
    
          openWebLinkIn(searchUrl, 'tab');
        }
      },
    
    
      cleanFileName: function(name) {
        name = name.toLowerCase();
    
        var expressions = [
          /\.uc\.js$/,
          /\.uc\.xul$/,
          /^ucjs_/,
          /_\d.+/,
          /_fx\d+/,
          /[-+\.]/g,
          /_v\d+/
        ];
    
        for (var i = 0; i < expressions.length; i++) {
          name = name.replace(expressions[i], '');
        }
    
        return name;
      }
    };
    
    
    /*
     * Script starten
     */
    uProfMenu.init();
    Alles anzeigen
  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 11. August 2026 um 19:08
    Zitat von Mira_Belle

    Funktioniert hier bei mir sowohl in der Final, als auch in der Nighty.

    Anderes Profil genommen, jetzt funktioniert es auch, also alles gut.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 11. August 2026 um 18:59
    Zitat von Mira_Belle

    Mh, ....
    War dieser Menüpunkt denn im ursprünglichen Skript vorhanden?

    Ja, aber in Zeile 29 muss dann die 1 aktiviert werden, hatte ich auch i.M. nicht mehr auf dem Schirm.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 11. August 2026 um 18:09
    Zitat von Mira_Belle

    ch habe das Skript insofern geändert, dass
    a. die userChromeShadow.uc.js nicht mehr "eingebunden" wird!

    Dann müsstest du das bei allen anderen auch so machen. Wer sich auf's Glatteis begibt, der sollte wissen was er macht.;)

    Zitat von Mira_Belle

    Auch ich halte das Chromeverzeichnis sauber und habe die Userskripte unter chrome/scripts

    Ich habe in Nightly getestet, aber im Submenü "Meine Scripte" werden nur aus dem Ordner chrome die Scripte aufgelistet. Obwohl in der userChrome.js das userChrome.import("scripts", "UChrm"); vorgegeben ist, und auch alle Scripte geladen werden.

    Und dann fehlt "Neustart" ganz.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 11. August 2026 um 08:47

    Endor

    Wenn ich mich mal einmischen darf, Mira hat ja geschrieben, dass wir am Original festhalten sollten, und das hat sie gemacht. In #2 hatte ich ja angekündigt, dass das Script angepasst wurde, damit Scripte auch aus dem Ordner "Scripte" aufgerufen werden können. So habe ich das z.B. bei mir, um den Ordner chrome "sauber" zu halten. Also ist schon i.O. so, wenn du Miras Script genommen hast.:thumbup:

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 17:49
    Zitat von Endor

    Habe jetzt Mira_Belles Version genommen.
    Werde diese dann auch bei Github hochladen.

    Aber gewiss doch, ich habe für mich eine erweiterte Version, das war nur ein Versuch ob es gelingt das Script so lauffähig zu bekommen. Will hoffen dass wir omar1979 nicht ganz wuschelig gemacht haben, aber er kann ja weitere Hilfe erwarten.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 15:07
    Zitat von Mira_Belle

    Wie Du leicht erkennen kannst habe ich eine kleine Korrektur in Zeile 52 eingebaut.

    Das War auch der Fehler, nun funktioniert es ohne.:thumbup:

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 14:49

    Das stimmt, jetzt aus Version 153:

    Uncaught TypeError: can't access property "setAttribute", menu is null   init file:///G:/Portable.Firefox.Updater.1/Firefox Stable x64/profile/chrome/Scripte/04_extras_config_menu3.uc.js:50   <anonymous> file:///G:/Portable.Firefox.Updater.1/Firefox Stable x64/profile/chrome/Scripte/04_extras_config_menu3.uc.js:499   loadScript file:///G:/Portable.Firefox.Updater.1/Firefox Stable x64/userChromeJS/utilities.js:11404_extras_config_menu3.uc.js:50:7

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 14:38
    Zitat von 2002Andreas

    Hier schon:

    Im Nightly ohne Fehler.:/

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 13:58
    Zitat von Mira_Belle

    Header von da genommen wird
    und einfach nur erweitert wird, z.B. so:

    Ist im Script geändert.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 13:54
    Zitat von 2002Andreas

    Muss an meinem Profil liegen, im Nightly ist alles ok

    Habe jetzt in drei Versionen getestet, überall ohne Fehler.:/

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 13:37
    Zitat von 2002Andreas

    Sehr schön

    Sehr gut, dann editiere ich mal meinen Beitrag.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 13:32

    2002Andreas

    Teste mal bitte.

    JavaScript
    // ==UserScript==
    // @name           extras_config_menu.uc.js
    // @compatibility  Firefox 153*.* (tested up to 155+)
    // @include        main
    // @version        1.0.20260810
    // @edit           @aborix		7/21 CSS Dateien als Untermenü eingefügt 
    // @edit           @2002Andreas	8/21 Shadow CSS Dateien als Untermenü + Ordner eingefügt
    // @edit           @BrokenHeart	1/25 Anpass. wg. Änderung der Sicherheitsrichtlinien bei 'inlineEvents'
    // @edit           @FuchFan 	8/26 Eval-freie Version mit Toolbar-Button
    // ==/UserScript==
    
    var uProfMenu = {
        // === KONFIGURATION ===
        TextOpenExe: 'C:\\Program Files\\Notepad++\\notepad++.exe',
        vFileManager: '',
        warpmenuto: '',
        sortScripts: 0,
        gmOrdner: 0,
        cssOrdner: 0,
        scriptFolder: 'Scripte',
    
        abouts: [
            'about:about', 'about:addons', 'about:cache', 'about:config',
            'about:crashes', 'about:downloads', 'about:home', 'about:logins',
            'about:memory', 'about:support', 'about:preferences',
            'about:performance', 'about:profiles'
        ],
    
        showNormalPrefs: 1,
        enableScriptsToClip: 2,
        enableRestart: 0,
    
        _initialized: false,
        _retryTimer: null,
        // === ENDE KONFIGURATION ===
    
    
        init: function() {
            if (this._initialized) {
                return;
            }
    
            if (location.href !== 'chrome://browser/content/browser.xhtml') {
                return;
            }
    
            var menuElement;
    
            if (this.warpmenuto.toLowerCase() === 'menu') {
                var zielmenu = document.getElementById('menu_ToolsPopup');
    
                if (!zielmenu) {
                    console.warn(
                        "extras_config_menu.uc.js: Extras-Menü noch nicht verfügbar."
                    );
                    this.retryInit();
                    return;
                }
    
                menuElement = document.getElementById("ExtraConfigMenu");
    
                if (!menuElement) {
                    menuElement = zielmenu.appendChild(
                        this.createME(
                            "menu",
                            "Config Menü",
                            0,
                            0,
                            "ExtraConfigMenu"
                        )
                    );
    
                    menuElement.setAttribute(
                        "class",
                        "menu-iconic"
                    );
    
                    menuElement.addEventListener(
                        "dblclick",
                        function() {
                            openTrustedLinkIn(
                                "about:config",
                                "tab"
                            );
                        },
                        true
                    );
                }
            } else {
                var widgetId = "ExtraConfigMenu-button";
                var widget = CustomizableUI.getWidget(widgetId);
    
                if (!widget) {
                    try {
                        CustomizableUI.createWidget({
                            id: widgetId,
                            defaultArea: CustomizableUI.AREA_NAVBAR,
                            label: "Extra Config Menü",
                            tooltiptext:
                                "Extra Config Menü\n" +
                                "Rechtsklick öffnet about:config"
                        });
                    } catch (e) {
                        console.error(
                            "extras_config_menu.uc.js: Widget konnte nicht erstellt werden.",
                            e
                        );
                    }
    
                    widget = CustomizableUI.getWidget(widgetId);
                }
    
                if (widget) {
                    try {
                        menuElement = widget
                            .forWindow(window)
                            .node;
                    } catch (e) {
                        menuElement = null;
                    }
                }
    
                if (!menuElement) {
                    menuElement = document.getElementById(widgetId);
                }
    
                if (!menuElement) {
                    console.warn(
                        "extras_config_menu.uc.js: Toolbar-Button noch nicht verfügbar."
                    );
                    this.retryInit();
                    return;
                }
    
                menuElement.setAttribute(
                    "type",
                    "menu"
                );
    
                if (!menuElement.hasAttribute(
                    "data-extraconfig-click"
                )) {
                    menuElement.setAttribute(
                        "data-extraconfig-click",
                        "true"
                    );
    
                    menuElement.addEventListener(
                        "click",
                        function(event) {
                            if (
                                event.button === 2 &&
                                !this.open
                            ) {
                                openTrustedLinkIn(
                                    "about:config",
                                    "tab"
                                );
                                event.preventDefault();
                            }
                        },
                        true
                    );
                }
            }
    
    
            // CSS für Menü/Button
            var css = `
                #ExtraConfigMenu,
                #ExtraConfigMenu-button {
                    list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACnElEQVR4Xm2RzYtbZRSHn/fr3pvJzTB3qiNM2k2pMBUGhEHaqsUqdeFGQalCobgREaFu/B/cqCtxVSjoQhBEQRBmIfWDKgNGJUPt0Nhah9JJ4iSd5E6+bu5972tAO4SS5/DjXZ1znsMrNiq1eikMQqYYJCmjxNH5+zdW777L0J5KKl9VPmnf+ut9KWkwhbheuzNcOVYOmGKc5iRO0r1ykeXCx0h7kt4fC3z5wfqbQnAJwQHa5S7jAZSRuJ0mkf81cheobhBXZa+ri1uptQjHAZoZCEC1PiPgDuwxCfwerBU7b73zXn//3usCcdt4HkZ7SGZg431U51NUCgwlO3cV/bVXhR/6p9ut+nP9QYeNn7/n8qUPZxvQ/Q6VVWHk4ZqWRvlJjpx9hcGfW2wO95N2q8m3618A2WwDt/0RplSAXsBed57eyossHl5GYdHacG3zGpADM06wjQ1UUIN+CLHPvfAxojPnKLiE+bDE1R9+5GatAmgPeGCAteQ7l5GBhGSyuROyd/gFouUyWkqEErR2mwXAAA8BRS0AgMQBjSra30ZkEeDzz9Dn4ZcvMO51SMcJcTdGChmA0ABA6cAgzyG3I8jLEBylV4fWoaeIc0V7t0Uv7pFbC+CA+28mp/8+SwXKnMVmz1O9HpE+eobMZdjcoY1GIHD/NwIdoH1fBaNguzlg88pVyoUi4vTbFI8eJxsNAIfSkrliESllH/L0v0jktNNomFGv1TFrL3Fo9QSMR3jaEEXzLC09gjaKp595No0WjyCEB4zRclICUMDxtRMce/wJ1MIi2SglXShhfI/cOjxPoZRmbq4gXzt/gVrtBrdvbiG+Wf+p/mvll1BpiVAGhCDPxuAUDotz4HKHlIJON6bRbL4hhPjcMx5mkn8BBLEUrsVZbq0AAAAASUVORK5CYII=");
                    margin-top: 0px !important;
                    opacity: 1 !important;
                }
    
                #ExtraConfigMenu-button > dropmarker,
                #ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker {
                    display: none !important;
                }
            `;
    
            var sss = Cc[
                '@mozilla.org/content/style-sheet-service;1'
            ].getService(
                Ci.nsIStyleSheetService
            );
    
            var uri = Cc[
                '@mozilla.org/network/io-service;1'
            ].getService(
                Ci.nsIIOService
            ).newURI(
                'data:text/css;charset=UTF-8,' +
                encodeURIComponent(css)
            );
    
            if (!sss.sheetRegistered(
                uri,
                sss.AGENT_SHEET
            )) {
                sss.loadAndRegisterSheet(
                    uri,
                    sss.AGENT_SHEET
                );
            }
    
    
            if (document.getElementById(
                "ExtraConfigMenu-popup"
            )) {
                this._initialized = true;
                return;
            }
    
            menuElement.addEventListener(
                "popupshowing",
                function() {
                    uProfMenu.getScripts(0);
                    uProfMenu.getCss(3);
                    uProfMenu.getCss(4);
                    uProfMenu.getCss(5);
                },
                true
            );
    
            var menupopup = menuElement.appendChild(
                this.createME(
                    "menupopup",
                    0,
                    0,
                    0,
                    "ExtraConfigMenu-popup"
                )
            );
    
    
            // === UNTERMENÜS ===
            var submenu = menupopup.appendChild(
                this.createME(
                    "menu",
                    "Meine Scripte",
                    0,
                    0,
                    "submenu-ucjs"
                )
            );
    
            submenu.appendChild(
                this.createME(
                    "menupopup",
                    0,
                    0,
                    0,
                    "submenu-ucjs-items"
                )
            );
    
    
            submenu = menupopup.appendChild(
                this.createME(
                    "menu",
                    "css",
                    0,
                    0,
                    "submenu-css"
                )
            );
    
            submenu.appendChild(
                this.createME(
                    "menupopup",
                    0,
                    0,
                    0,
                    "submenu-css-items"
                )
            );
    
    
            submenu = menupopup.appendChild(
                this.createME(
                    "menu",
                    "CSSShadow",
                    0,
                    0,
                    "submenu-CSSShadow"
                )
            );
    
            submenu.appendChild(
                this.createME(
                    "menupopup",
                    0,
                    0,
                    0,
                    "submenu-CSSShadow-items"
                )
            );
    
    
            submenu = menupopup.appendChild(
                this.createME(
                    "menu",
                    "cssweb",
                    0,
                    0,
                    "submenu-cssweb"
                )
            );
    
            submenu.appendChild(
                this.createME(
                    "menupopup",
                    0,
                    0,
                    0,
                    "submenu-cssweb-items"
                )
            );
    
    
            if (this.enableScriptsToClip) {
                menupopup.appendChild(
                    this.createME(
                        "menuitem",
                        "Skriptliste in Zwischenablage",
                        function() {
                            uProfMenu.getScripts(1);
                        },
                        "uProfMenu_clipboard",
                        0
                    )
                );
            }
    
            menupopup.appendChild(
                document.createXULElement(
                    "menuseparator"
                )
            );
    
    
            // === KONFIGURATIONSDATEIEN ===
            var configFiles = [
                {
                    label: "Bild Url",
                    file: "Bild Url.css",
                    mode: 0
                },
                {
                    label: "config Einträge.css",
                    file: "config Einträge.css",
                    mode: 0
                },
                {
                    label: "userChrome.css",
                    file: "userChrome.css",
                    mode: 0
                },
                {
                    label: "userChromeShadow.css",
                    file: "userChromeShadow.css",
                    mode: 0
                },
                {
                    label: "userContent.css",
                    file: "userContent.css",
                    mode: 0
                },
                {
                    label: "userChrome.js",
                    file: "userChrome.js",
                    mode: 0
                },
                {
                    label: "prefs.js",
                    file: "prefs.js",
                    mode: 1
                },
                {
                    label: "user.js",
                    file: "user.js",
                    mode: 1
                }
            ];
    
            configFiles.forEach(function(item) {
                menupopup.appendChild(
                    uProfMenu.createME(
                        "menuitem",
                        item.label,
                        function() {
                            uProfMenu.edit(
                                item.mode,
                                item.file
                            );
                        },
                        "uProfMenu_edit",
                        0
                    )
                );
            });
    
            menupopup.appendChild(
                document.createXULElement(
                    "menuseparator"
                )
            );
    
    
            // === ORDNER ===
            switch (this.gmOrdner) {
                case 1:
                    menupopup.appendChild(
                        this.createME(
                            "menuitem",
                            "GM-skripty",
                            function() {
                                uProfMenu.dirOpen(
                                    uProfMenu.getPrefDirectoryPath(
                                        "ProfD"
                                    ) +
                                    uProfMenu.getDirSep() +
                                    "gm_scripts"
                                );
                            },
                            "uProfMenu_folder",
                            0
                        )
                    );
                    break;
    
                case 2:
                    menupopup.appendChild(
                        this.createME(
                            "menuitem",
                            "USL-skripty",
                            function() {
                                uProfMenu.dirOpen(
                                    uProfMenu.getPrefDirectoryPath(
                                        "UChrm"
                                    ) +
                                    uProfMenu.getDirSep() +
                                    "UserScriptLoader"
                                );
                            },
                            "uProfMenu_folder",
                            0
                        )
                    );
                    break;
    
                case 3:
                    menupopup.appendChild(
                        this.createME(
                            "menuitem",
                            "Skripty Scriptish",
                            function() {
                                uProfMenu.dirOpen(
                                    uProfMenu.getPrefDirectoryPath(
                                        "ProfD"
                                    ) +
                                    uProfMenu.getDirSep() +
                                    "scriptish_scripts"
                                );
                            },
                            "uProfMenu_folder",
                            0
                        )
                    );
                    break;
            }
    
    
            var folders = [
                {
                    label: "CSS-Ordner",
                    path: "css"
                },
                {
                    label: "CSSShadow-Ordner",
                    path: "CSSShadow"
                },
                {
                    label: "CSSWeb-Ordner",
                    path: "CSSWeb"
                },
                {
                    label: "Icons-Ordner",
                    path: "Icons"
                },
                {
                    label: "Ordner Scripte",
                    path: this.scriptFolder
                }
            ];
    
            if (this.cssOrdner) {
                folders.unshift({
                    label: "CSS-Ordner",
                    path: "CSS"
                });
            }
    
            folders.forEach(function(item) {
                menupopup.appendChild(
                    uProfMenu.createME(
                        "menuitem",
                        item.label,
                        function() {
                            uProfMenu.dirOpen(
                                uProfMenu.getPrefDirectoryPath(
                                    "UChrm"
                                ) +
                                uProfMenu.getDirSep() +
                                item.path
                            );
                        },
                        "uProfMenu_folder",
                        0
                    )
                );
            });
    
            menupopup.appendChild(
                this.createME(
                    "menuitem",
                    "Chromeordner",
                    function() {
                        uProfMenu.prefDirOpen("UChrm");
                    },
                    "uProfMenu_folder",
                    0
                )
            );
    
            menupopup.appendChild(
                this.createME(
                    "menuitem",
                    "Profilordner",
                    function() {
                        uProfMenu.prefDirOpen("ProfD");
                    },
                    "uProfMenu_folder",
                    0
                )
            );
    
            menupopup.appendChild(
                this.createME(
                    "menuitem",
                    "Installationsordner",
                    function() {
                        uProfMenu.prefDirOpen("CurProcD");
                    },
                    "uProfMenu_folder",
                    0
                )
            );
    
            menupopup.appendChild(
                this.createME(
                    "menuitem",
                    "Addonordner",
                    function() {
                        uProfMenu.dirOpen(
                            uProfMenu.getPrefDirectoryPath(
                                "ProfD"
                            ) +
                            uProfMenu.getDirSep() +
                            "extensions"
                        );
                    },
                    "uProfMenu_folder",
                    0
                )
            );
    
            menupopup.appendChild(
                this.createME(
                    "menuitem",
                    "Startup-Cacheordner",
                    function() {
                        uProfMenu.dirOpen(
                            uProfMenu.getPrefDirectoryPath(
                                "ProfLD"
                            ) +
                            uProfMenu.getDirSep() +
                            "startupCache"
                        );
                    },
                    "uProfMenu_folder",
                    0
                )
            );
    
    
            // === ABOUT-SEITEN ===
            if (this.abouts.length > 0) {
                menupopup.appendChild(
                    document.createXULElement(
                        "menuseparator"
                    )
                );
    
                var submenuAbout = menupopup.appendChild(
                    this.createME(
                        "menu",
                        "uc.js",
                        0,
                        0,
                        "submenu-about"
                    )
                );
    
                submenuAbout.appendChild(
                    this.createME(
                        "menupopup",
                        0,
                        0,
                        0,
                        "submenu-about-items"
                    )
                );
    
                this.fillMenu(
                    "submenu-about",
                    "submenu-about-items",
                    "about:",
                    this.abouts,
                    "uProfMenu_about",
                    1
                );
            }
    
    
            if (
                this.abouts.length === 0 &&
                (
                    this.showNormalPrefs ||
                    typeof ToolRstartMod !== "undefined"
                )
            ) {
                menupopup.appendChild(
                    document.createXULElement(
                        "menuseparator"
                    )
                );
            }
    
    
            if (this.showNormalPrefs) {
                menupopup.appendChild(
                    this.createME(
                        "menuitem",
                        "Einstellungen",
                        function() {
                            try {
                                openOptionsDialog();
                            } catch (e) {
                                openPreferences();
                            }
                        },
                        "uProfMenu_prefs",
                        0
                    )
                );
            }
    
    
            if (this.enableRestart) {
                menupopup.appendChild(
                    this.createME(
                        "menuitem",
                        "Neustart",
                        function() {
                            Services.appinfo
                                .invalidateCachesOnRestart();
    
                            Services.startup.quit(
                                Ci.nsIAppStartup.eRestart |
                                Ci.nsIAppStartup.eAttemptQuit,
                                0
                            );
                        },
                        0,
                        0
                    )
                );
            }
    
            this._initialized = true;
        },
    
    
        retryInit: function() {
            if (this._retryTimer) {
                return;
            }
    
            var self = this;
    
            this._retryTimer = setTimeout(function() {
                self._retryTimer = null;
                self.init();
            }, 500);
        },
    
    
        getDirSep: function() {
            var osString = Cc[
                '@mozilla.org/xre/app-info;1'
            ].getService(
                Ci.nsIXULRuntime
            ).OS;
    
            switch (osString) {
                case "WINNT":
                    return "\\";
    
                case "Linux":
                case "Darwin":
                    return "/";
    
                default:
                    return "/";
            }
        },
    
    
        edit: function(OpenMode, Filename) {
            var Path = "";
            var dSep = this.getDirSep();
    
            switch (OpenMode) {
                case 0:
                    Path =
                        this.getPrefDirectoryPath("UChrm") +
                        dSep +
                        Filename;
                    break;
    
                case 1:
                    Path =
                        this.getPrefDirectoryPath("ProfD") +
                        dSep +
                        Filename;
                    break;
    
                case 2:
                    Path = Filename;
                    break;
    
                case 3:
                    Path =
                        this.getPrefDirectoryPath("UChrm") +
                        dSep +
                        "CSS" +
                        dSep +
                        Filename;
                    break;
    
                case 4:
                    Path =
                        this.getPrefDirectoryPath("UChrm") +
                        dSep +
                        "CSSWeb" +
                        dSep +
                        Filename;
                    break;
    
                case 5:
                    Path =
                        this.getPrefDirectoryPath("UChrm") +
                        dSep +
                        "CSSShadow" +
                        dSep +
                        Filename;
                    break;
            }
    
            this.launch(
                this.TextOpenExe,
                Path
            );
        },
    
    
        editPath: function(Path) {
            this.launch(
                this.TextOpenExe,
                Path
            );
        },
    
    
        dirOpen: function(Path) {
            if (this.vFileManager.length !== 0) {
                var file = Cc[
                    '@mozilla.org/file/local;1'
                ].createInstance(
                    Ci.nsIFile
                );
    
                var process = Cc[
                    '@mozilla.org/process/util;1'
                ].createInstance(
                    Ci.nsIProcess
                );
    
                var args = [Path];
    
                file.initWithPath(
                    this.vFileManager
                );
    
                process.init(file);
                process.run(
                    false,
                    args,
                    args.length
                );
            } else {
                var dir = Cc[
                    '@mozilla.org/file/local;1'
                ].createInstance(
                    Ci.nsIFile
                );
    
                dir.initWithPath(Path);
                dir.launch();
            }
        },
    
    
        prefDirOpen: function(prefDir) {
            this.dirOpen(
                this.getPrefDirectoryPath(prefDir)
            );
        },
    
    
        getPrefDirectoryPath: function(str) {
            var file = Cc[
                '@mozilla.org/file/directory_service;1'
            ].getService(
                Ci.nsIProperties
            ).get(
                str,
                Ci.nsIFile
            );
    
            if (str === "CurProcD") {
                file = file.parent;
            }
    
            return file.path;
        },
    
    
        launch: function(RanPath, OpenPath) {
            var editor = Cc[
                '@mozilla.org/file/local;1'
            ].createInstance(
                Ci.nsIFile
            );
    
            var process = Cc[
                '@mozilla.org/process/util;1'
            ].createInstance(
                Ci.nsIProcess
            );
    
            try {
                editor.initWithPath(RanPath);
    
                if (!editor.exists() || !editor.isFile()) {
                    var prefs = Cc[
                        '@mozilla.org/preferences-service;1'
                    ].getService(
                        Ci.nsIPrefBranch
                    );
    
                    if (prefs.prefHasUserValue(
                        "view_source.editor.path"
                    )) {
                        RanPath = prefs.getCharPref(
                            "view_source.editor.path"
                        );
    
                        editor.initWithPath(RanPath);
                    }
                }
    
                if (!editor.exists() || !editor.isFile()) {
                    console.error(
                        "extras_config_menu.uc.js: Editor nicht gefunden:",
                        RanPath
                    );
                    return;
                }
    
                var target = Cc[
                    '@mozilla.org/file/local;1'
                ].createInstance(
                    Ci.nsIFile
                );
    
                target.initWithPath(OpenPath);
    
                if (!target.exists() || !target.isFile()) {
                    console.error(
                        "extras_config_menu.uc.js: Datei nicht gefunden:",
                        OpenPath
                    );
                    return;
                }
    
                var args = [OpenPath];
    
                process.init(editor);
    
                if (typeof process.runwAsync === "function") {
                    process.runwAsync(
                        args,
                        args.length
                    );
                } else if (typeof process.runw === "function") {
                    process.runw(
                        false,
                        args,
                        args.length
                    );
                } else {
                    process.run(
                        false,
                        args,
                        args.length
                    );
                }
            } catch (e) {
                console.error(
                    "extras_config_menu.uc.js: Fehler beim Öffnen:",
                    e
                );
            }
        },
    
    
        stringComparison: function(a, b) {
            a = a.toLowerCase()
                .replace(/ä/g, "a")
                .replace(/ö/g, "o")
                .replace(/ü/g, "u")
                .replace(/ß/g, "s");
    
            b = b.toLowerCase()
                .replace(/ä/g, "a")
                .replace(/ö/g, "o")
                .replace(/ü/g, "u")
                .replace(/ß/g, "s");
    
            return (a === b) ? 0 : (a > b) ? 1 : -1;
        },
    
    
        getScripts: function(iType) {
            var scripts = [];
            var extjs = /\.uc\.js$/i;
            var chromePath = this.getPrefDirectoryPath("UChrm");
            var dSep = this.getDirSep();
    
            var readFolder = function(folderPath) {
                var folder = Cc[
                    '@mozilla.org/file/local;1'
                ].createInstance(
                    Ci.nsIFile
                );
    
                folder.initWithPath(folderPath);
    
                if (!folder.exists() || !folder.isDirectory()) {
                    return;
                }
    
                var files = folder.directoryEntries
                    .QueryInterface(
                        Ci.nsISimpleEnumerator
                    );
    
                while (files.hasMoreElements()) {
                    var file = files.getNext()
                        .QueryInterface(Ci.nsIFile);
    
                    if (
                        file.isFile() &&
                        extjs.test(file.leafName)
                    ) {
                        scripts.push({
                            name: file.leafName,
                            path: file.path
                        });
                    }
                }
            };
    
            // Scripts direkt aus chrome
            readFolder(chromePath);
    
            // Scripts aus chrome/Scripte
            readFolder(
                chromePath +
                dSep +
                this.scriptFolder
            );
    
            if (this.sortScripts) {
                scripts.sort(function(a, b) {
                    return uProfMenu.stringComparison(
                        a.name,
                        b.name
                    );
                });
            }
    
            if (iType === 0) {
                this.fillMenu(
                    "submenu-ucjs",
                    "submenu-ucjs-items",
                    "Meine Scripte",
                    scripts,
                    "uProfMenu_ucjs",
                    0
                );
            } else {
                var names = [];
    
                for (var i = 0; i < scripts.length; i++) {
                    names.push(scripts[i].name);
                }
    
                var result = this.fillClipboardValue(
                    names,
                    []
                );
    
                Cc[
                    '@mozilla.org/widget/clipboardhelper;1'
                ].getService(
                    Ci.nsIClipboardHelper
                ).copyString(result);
            }
        },
    
    
        getCss: function(iType) {
            var cssFiles = [];
            var extcss = /\.css$/i;
            var subfolder = "";
            var menuId = "";
            var label = "";
    
            switch (iType) {
                case 3:
                    subfolder = "CSS";
                    menuId = "submenu-css";
                    label = "Meine CSS-Dateien";
                    break;
    
                case 4:
                    subfolder = "CSSWeb";
                    menuId = "submenu-cssweb";
                    label = "Meine CSSWeb-Dateien";
                    break;
    
                case 5:
                    subfolder = "CSSShadow";
                    menuId = "submenu-CSSShadow";
                    label = "Meine CSSShadow-Dateien";
                    break;
    
                default:
                    return;
            }
    
            var folder = Cc[
                '@mozilla.org/file/local;1'
            ].createInstance(
                Ci.nsIFile
            );
    
            folder.initWithPath(
                this.getPrefDirectoryPath("UChrm") +
                this.getDirSep() +
                subfolder
            );
    
            if (
                !folder.exists() ||
                !folder.isDirectory()
            ) {
                this.fillMenu(
                    menuId,
                    menuId + "-items",
                    label,
                    [],
                    "uProfMenu_css",
                    iType
                );
                return;
            }
    
            var files = folder.directoryEntries
                .QueryInterface(
                    Ci.nsISimpleEnumerator
                );
    
            while (files.hasMoreElements()) {
                var file = files.getNext()
                    .QueryInterface(Ci.nsIFile);
    
                if (
                    file.isFile() &&
                    extcss.test(file.leafName)
                ) {
                    cssFiles.push(file.leafName);
                }
            }
    
            if (this.sortScripts) {
                cssFiles.sort(
                    this.stringComparison
                );
            }
    
            this.fillMenu(
                menuId,
                menuId + "-items",
                label,
                cssFiles,
                "uProfMenu_css",
                iType
            );
        },
    
    
        fillMenu: function(
            whichsubmenu,
            whichsubmenuitems,
            strlabel,
            scriptArray,
            sClass,
            sTyp
        ) {
            var e = document.getElementById(
                whichsubmenu
            );
    
            if (e) {
                e.setAttribute(
                    "label",
                    strlabel +
                    " (" +
                    scriptArray.length +
                    ")"
                );
            }
    
            var popup = document.getElementById(
                whichsubmenuitems
            );
    
            if (!popup) {
                return;
            }
    
            while (popup.hasChildNodes()) {
                popup.removeChild(
                    popup.firstChild
                );
            }
    
            for (
                var i = scriptArray.length - 1;
                i >= 0;
                i--
            ) {
                var mitem;
                var current = scriptArray[i];
    
                switch (sTyp) {
                    case 0:
                        (function(script) {
                            mitem = uProfMenu.createME(
                                "menuitem",
                                script.name,
                                function() {
                                    uProfMenu.editPath(
                                        script.path
                                    );
                                },
                                sClass,
                                0
                            );
    
                            mitem.addEventListener(
                                "click",
                                function(event) {
                                    if (event.button === 1) {
                                        uProfMenu.openAtGithub(
                                            event,
                                            script.name
                                        );
                                    } else if (
                                        event.button === 2
                                    ) {
                                        event.preventDefault();
    
                                        var sUrl =
                                            "https://github.com/search?langOverride=&language=&q=" +
                                            encodeURIComponent(
                                                script.name
                                            ) +
                                            "&repo=&start_value=1&type=Code";
    
                                        openTrustedLinkIn(
                                            sUrl,
                                            "tab"
                                        );
                                    }
                                },
                                true
                            );
    
                            mitem.setAttribute(
                                "tooltiptext",
                                "Linksklick: Bearbeiten,\n" +
                                "Mittelklick: GitHub öffnen,\n" +
                                "Rechtsklick: Suche auf GitHub"
                            );
                        })(current);
                        break;
    
                    case 1:
                        (function(url) {
                            mitem = uProfMenu.createME(
                                "menuitem",
                                url,
                                function() {
                                    openTrustedLinkIn(
                                        url,
                                        "tab"
                                    );
                                },
                                sClass,
                                0
                            );
                        })(current);
                        break;
    
                    case 3:
                    case 4:
                    case 5:
                        (function(name, mode) {
                            mitem = uProfMenu.createME(
                                "menuitem",
                                name,
                                function() {
                                    uProfMenu.edit(
                                        mode,
                                        name
                                    );
                                },
                                sClass,
                                0
                            );
                        })(current, sTyp);
                        break;
                }
    
                if (mitem) {
                    popup.insertBefore(
                        mitem,
                        popup.firstChild
                    );
                }
            }
        },
    
    
        fillClipboardValue: function(
            sArray,
            xArray
        ) {
            var s = sArray.length;
            var x = xArray.length;
            var retValue;
    
            switch (this.enableScriptsToClip) {
                case 1:
                    retValue =
                        "userChromeJS/uc.js (" +
                        s +
                        "):\n" +
                        "------------------------\n" +
                        sArray.join("\n") +
                        "\n\nuserChromeJS/uc.xul (" +
                        x +
                        "):\n" +
                        "-------------------------\n" +
                        xArray.join("\n");
                    break;
    
                default:
                    retValue =
                        "userChromeJS/uc.js (" +
                        s +
                        "):\n" +
                        "------------------------";
    
                    for (var i = 0; i < s; i++) {
                        retValue +=
                            "\n" +
                            (i + 1) +
                            ". " +
                            sArray[i];
                    }
    
                    retValue +=
                        "\n\nuserChromeJS/uc.xul (" +
                        x +
                        "):\n" +
                        "-------------------------";
    
                    if (this.enableScriptsToClip === 2) {
                        s = 0;
                    }
    
                    for (var j = 0; j < x; j++) {
                        retValue +=
                            "\n" +
                            (j + s + 1) +
                            ". " +
                            xArray[j];
                    }
                    break;
            }
    
            return retValue;
        },
    
    
        createME: function(
            sTyp,
            sLabel,
            sCommand,
            sClass,
            sId
        ) {
            const XUL_NS =
                "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    
            var m = document.createElementNS(
                XUL_NS,
                sTyp
            );
    
            switch (sTyp) {
                case "menuitem":
                    m.setAttribute(
                        "label",
                        sLabel
                    );
    
                    if (sClass) {
                        m.setAttribute(
                            "class",
                            sClass
                        );
                    }
    
                    if (sId) {
                        m.setAttribute(
                            "id",
                            sId
                        );
                    }
    
                    if (typeof sCommand === "function") {
                        m.addEventListener(
                            "command",
                            sCommand,
                            true
                        );
                    }
                    break;
    
                case "menu":
                    m.setAttribute(
                        "label",
                        sLabel
                    );
    
                    if (sId) {
                        m.setAttribute(
                            "id",
                            sId
                        );
                    }
                    break;
    
                case "menupopup":
                    if (sId) {
                        m.setAttribute(
                            "id",
                            sId
                        );
                    }
                    break;
            }
    
            return m;
        },
    
    
        openAtGithub: function(e, sScript) {
            if (e.button === 1) {
                var sUrl =
                    "https://github.com/ardiman/userChrome.js/tree/master/" +
                    this.cleanFileName(sScript);
    
                openTrustedLinkIn(
                    sUrl,
                    "tab"
                );
            }
        },
    
    
        cleanFileName: function(sName) {
            sName = sName.toLowerCase();
    
            var regs = [
                /\.uc\.js$/,
                /\.uc\.xul$/,
                /^ucjs_/,
                /_\d.+/,
                /_fx\d+/,
                /[-+\.]/g,
                /_v\d+/
            ];
    
            for (var i = 0; i < regs.length; i++) {
                sName = sName.replace(
                    regs[i],
                    ""
                );
            }
    
            return sName;
        }
    };
    
    
    // Initialisierung
    uProfMenu.init();
    Alles anzeigen


    Edit: dieses Script braucht diesen config-Schalter security.allow_unsafe_dangerous_privileged_evil_eval auf true nicht mehr. Auch gibt es hiermit keine Fehler mehr in der Konsole.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 13:02
    Zitat von 2002Andreas

    Allerdings in der Konsole:

    Ich habe auch meines jetzt so eingerichtet, ohne Fehler. Aber ich schau mir das noch mal an, mal sehen was KI sagt.

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 12:44
    Zitat von 2002Andreas

    Ja.

    :thumbup:

  • extra_config_menu.uc.js > ohne security.allow_unsafe_dangerous_privileged_evil_eval auf false

    • FuchsFan
    • 10. August 2026 um 12:42
    Zitat von 2002Andreas

    scheint zu funktionieren

    Klick auf eine Datei oder ein Script funktioniert dann auch?

Unterstütze uns!

Jährlich (2026)

70,5 %

70,5% (546,48 von 775 EUR)

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