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

Beiträge von Mira_Belle

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

    • Mira_Belle
    • 3. August 2025 um 21:50
    Zitat von Horstmann

    Bei nur sehr begrenzten Erfahrung mit AI: niemals Code direkt übernehmen, nicht eine Zeile, ohne gegen zu recherchieren.

    Ist es legitim, einfach zuschauen, was der Code macht?
    Ob es funktioniert?
    Eine zweite, andere KI zu befragen?

    Wir sind dann gerade in eine Grundsatzdiskussion geraten!

    Wann darf KI genutzt werden?
    Darf überhaupt KI genutzt werden?

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

    • Mira_Belle
    • 3. August 2025 um 20:57

    .DeJaVu Es geht ja auch nicht um das Generieren!
    In erster Linie geht es um Anpassungen und Fehlerkorrekturen, das geht, vorausgesetzt man stellt die richtigen Fragen
    oder gibt die richtigen Kommandos, dann doch recht gut.
    Ganz neue Skripte oder neue Funktionen, das wird extrem schwierig und bedarf viel Zeit und Geduld
    und ob es überhaupt klappt, steht auch überhaupt nicht fest.

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

    • Mira_Belle
    • 3. August 2025 um 20:35
    Zitat von FuchsFan

    Gewagt habe ich es schon mehrmals, mit Vorlagen aus anderen Scripten, aber es will nicht gelingen.

    Verstehe, ist auch nicht ganz einfach, gebe ich zu. Vielleicht habe ich doch ein Händchen dafür, mit diesen
    widerspenstigen Programmen, KI's sind nichts anderes, umzugehen.

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

    • Mira_Belle
    • 3. August 2025 um 19:19
    Zitat von FuchsFan

    ... ist es möglich hier auch Submenüs (wenigsten eines) einzuarbeiten, ...

    Bestimmt, ganz sicher sogar, aber Du vergisst, ich kann kein JavaScript!
    Wenn ich bestehende Skript "repariere", dann ganz oft mittels mistral.ai oder ChatGPT, manchmal auch mittels arena.ai.
    Und selbst da muss ich schon recht oft mehrere Anläufe machen, nicht immer verstehen diese KI's, was ich von denen will.
    Sicher, kleinere Anpassungen kann ich auch so machen, wenn nicht allzu komplex, habe ja so einige Vorlagen.
    Aber das, was Du gerne möchtest, das ist dann doch schon eine Hausnummer.
    Eventuell kann einer der ganz wenigen Profis hier Dir weiter helfen, oder Du wagst es selbst einmal.

  • Symbolabstände in einigen Menüs und Kontextmenüs zu groß

    • Mira_Belle
    • 3. August 2025 um 18:35

    1. Deine userChrome.css
    2. Screenshot, damit ich sehen kann, um welches Symbol es geht.

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

    • Mira_Belle
    • 3. August 2025 um 18:32
    Zitat von FuchsFan

    Ich habe nur in Zeile 14 "Button" eingetragen.

    Oh sorry, mein Fehler!
    Das Versuchsskript war ein anderes und ich habe aus dem Original den oberen Teil einfach hier reinkopiert!
    Im Versuchsskript steht da tatsächlich:

    JavaScript
    var gExternalApplications = {
      type: 'button', // 'menu' or 'button'
      insertafter: 'PanelUI-menu-button',
  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mira_Belle
    • 3. August 2025 um 17:04

    FuchsFan Soooo, verschiebbar und mit Symbol.

    JavaScript
    // ==UserScript==
    // @name           XP - Spider.uc.js
    // @namespace      ithinc#mozine.cn
    // @description    External Applications
    // @include        main
    // @compatibility  Firefox 143.x
    // @author         ithinc
    // @version        20250803 Edited by: Mira
    // ==/UserScript==
    
    /* :::: External Applications :::: */
    
    var gExternalApplications = {
      type: 'menu', //'menu' or 'button'
      insertafter: '',
    
      apps: [
        
    	{name: 'Download Firefox', path: 'D:\\Download Firefox'},
    	{name: 'Ordner Screenshots', path: 'C:\\Users\\Old Man\\Pictures\\Screenshots'},
    	{name: 'Windows Explorer', path: 'C:\\Windows\\explorer.exe'},
    	{name: 'Editor', path: 'C:\\Windows\\System32\\notepad.exe'},
    	{name: 'Ordner Dokumente', path: 'C:\\Users\\Old Man\\Documents'},
    	{name: 'notepad++', path: 'C:\\notepad++\\notepad++.exe'},
    	{name: 'Rechner', path: 'C:\\WINDOWS\\system32\\calc.exe'},
    	{name: 'Ordner Backup ArbeitsFox', path: 'E:\\BackupFirefox\\ArbeitsFox '},
    	{name: 'Ordner BackupFirefox', path: 'E:\\BackupFirefox'},
    	{name: 'Ordner ArchiveFirefox', path: 'G:\\ArchiveFirefox'},
    	{name: 'Firefox Beta 3', path: 'G:\\Portable.Firefox.Updater.3\\Firefox Beta x64 Launcher.exe'},
    	{name: 'Firefox Nightly 3', path: 'G:\\Portable.Firefox.Updater.3\\Firefox Nightly x64 Launcher.exe'},
    	{name: 'Firefox Stable 3', path: 'G:\\Portable.Firefox.Updater.3\\Firefox Stable x64 Launcher.exe'},
    	{name: 'Ordner Portable.Firefox.Updater.1', path: 'G:\\Portable.Firefox.Updater.1'},
    	{name: 'Ordner Portable.Firefox.Updater.2', path: 'G:\\Portable.Firefox.Updater.2'},
    	{name: 'Ordner Portable.Firefox.Updater.3', path: 'G:\\Portable.Firefox.Updater.3'},
    	{name: 'Ordner Portable.Firefox.Updater.4', path: 'G:\\Portable.Firefox.Updater.4'},
    	{name: 'Portable Start', path: 'G:\\Starter'},
    	{name: 'Ordner FoxIcons', path: 'C:\\FoxIcons'},
    	{name: 'Ordner FoxIcons2', path: 'C:\\FoxIcons2'},
    	{name: 'Installationsordner', path: 'C:\\Program Files\\Mozilla Firefox'},
    	
      ],
    
      init: function() {
        for (var i = 0; i < this.apps.length; i++) {
          if (!this.apps[i].path) continue;
          if (!this.apps[i].args) this.apps[i].args = [];
    
          this.apps[i].path = this.apps[i].path.replace(/\//g, '\\');
    
          var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
          if (/^(\\)/.test(this.apps[i].path)) {
            this.apps[i].path = ffdir.substr(0, 2) + this.apps[i].path;
          } else if (/^(\.)/.test(this.apps[i].path)) {
            this.apps[i].path = ffdir + '\\' + this.apps[i].path;
          }
        }
    
        if (location.href !== 'chrome://browser/content/browser.xhtml') return;
    
        if (this.type == 'menu') {
          var mainmenu = document.getElementById('nav-bar');
          var menu = mainmenu.appendChild(document.createXULElement('menu'));
          menu.setAttribute('label', 'Start');
          menu.setAttribute('accesskey', 'a');
    
          var menupopup = menu.appendChild(document.createXULElement('menupopup'));
          for (var i = 0; i < this.apps.length; i++) {
            menupopup.appendChild(this.createMenuitem(this.apps[i]));
          }
        } else {
          if (!CustomizableUI.getPlacementOfWidget('ExtAppButton')) {
            try {
              CustomizableUI.createWidget({
                id: 'ExtAppButton',
                type: 'custom',
                defaultArea: CustomizableUI.AREA_NAVBAR,
                onBuild: function(aDocument) {
                  let toolbarbutton = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
                  toolbarbutton.id = 'ExtAppButton';
                  toolbarbutton.setAttribute('label', 'Start');
                  toolbarbutton.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional');
                  toolbarbutton.setAttribute('type', 'menu');
                  let menupopup = toolbarbutton.appendChild(aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menupopup'));
                  for (var i = 0; i < gExternalApplications.apps.length; i++) {
                    menupopup.appendChild(gExternalApplications.createMenuitem(gExternalApplications.apps[i]));
                  }
                  return toolbarbutton;
                }
              });
            } catch(e) {
              console.error(e);
              return;
            };
    
            let ProfilePath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Profilordner und gleich in den entsprechenden Unterordner
            let ButtonIcon = "default-browser-red.svg"; // Name & Dateiendung des anzuzeigenden Symbols!
            let sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);       
            let uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
        
                #ExtAppButton { list-style-image: url("${ProfilePath}/${ButtonIcon}") }
                #ExtAppButton.toolbarbutton-1.chromeclass-toolbar-additional image.toolbarbutton-icon {
                  width: 28px !important;
                  height: 28px !important;
                  fill: #83ee1a !important;
                  fill-opacity: 1 !important;
                  }
        
              `), null, null);
        
            sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);   
          }
        }
      },
    
      exec: function(path, args) {
        for (var i = 0; i < args.length; i++) {
          args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
        }
    
        var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
        file.initWithPath(path);
        if (!file.exists()) {
          throw 'File Not Found: ' + path;
        }
    
        if (!file.isExecutable() || args.length == 0) {
          file.launch();
        } else {
          var process = Cc['@mozilla.org/process/util;1'].getService(Ci.nsIProcess);
          process.init(file);
          process.run(false, args, args.length);
        }
      },
    
      createMenuitem: function(app) {
        if (app.name == 'separator')
          return document.createXULElement('menuseparator');
    
        var item = document.createXULElement('menuitem');
        item.setAttribute('class', 'menuitem-iconic');
        item.setAttribute('label', app.name);
        item.setAttribute('image', 'moz-icon:file:///' + encodeURIComponent(app.path) + '?size=16');
    
        item.addEventListener('command', function(event) {
          if (event.button == 0) {
            gExternalApplications.exec(this.path, this.args);
          }
        });
    
        item.path = app.path;
        item.args = app.args;
        return item;
      }
    };
    
    gExternalApplications.init();
    Alles anzeigen

    Symbol kann ausgetauscht werden und der Pfad dahin sollte auch angepasst werden.

    Und putzen müsste man auch mal!

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

    • Mira_Belle
    • 3. August 2025 um 16:09

    FuchsFan
    Bitte testen.


    JavaScript
    // ==UserScript==
    // @name           XP - Spider.uc.js
    // @namespace      ithinc#mozine.cn
    // @description    External Applications
    // @include        main
    // @compatibility  Firefox 143.x
    // @author         ithinc
    // @version        20250803
    // ==/UserScript==
    
    /* :::: External Applications :::: */
    
    
    
    var gExternalApplications = {
      type: 'menu', //'menu' or 'button'
      insertafter: '',
    
      apps: [
        
    	{name: 'Download Firefox', path: 'D:\\Download Firefox'},
    	{name: 'Ordner Screenshots', path: 'C:\\Users\\Old Man\\Pictures\\Screenshots'},
    	{name: 'Windows Explorer', path: 'C:\\Windows\\explorer.exe'},
    	{name: 'Editor', path: 'C:\\Windows\\System32\\notepad.exe'},
    	{name: 'Ordner Dokumente', path: 'C:\\Users\\Old Man\\Documents'},
    	{name: 'notepad++', path: 'C:\\notepad++\\notepad++.exe'},
    	{name: 'Rechner', path: 'C:\\WINDOWS\\system32\\calc.exe'},
    	{name: 'Ordner Backup ArbeitsFox', path: 'E:\\BackupFirefox\\ArbeitsFox '},
    	{name: 'Ordner BackupFirefox', path: 'E:\\BackupFirefox'},
    	{name: 'Ordner ArchiveFirefox', path: 'G:\\ArchiveFirefox'},
    	{name: 'Firefox Beta 3', path: 'G:\\Portable.Firefox.Updater.3\\Firefox Beta x64 Launcher.exe'},
    	{name: 'Firefox Nightly 3', path: 'G:\\Portable.Firefox.Updater.3\\Firefox Nightly x64 Launcher.exe'},
    	{name: 'Firefox Stable 3', path: 'G:\\Portable.Firefox.Updater.3\\Firefox Stable x64 Launcher.exe'},
    	{name: 'Ordner Portable.Firefox.Updater.1', path: 'G:\\Portable.Firefox.Updater.1'},
    	{name: 'Ordner Portable.Firefox.Updater.2', path: 'G:\\Portable.Firefox.Updater.2'},
    	{name: 'Ordner Portable.Firefox.Updater.3', path: 'G:\\Portable.Firefox.Updater.3'},
    	{name: 'Ordner Portable.Firefox.Updater.4', path: 'G:\\Portable.Firefox.Updater.4'},
    	{name: 'Portable Start', path: 'G:\\Starter'},
    	{name: 'Ordner FoxIcons', path: 'C:\\FoxIcons'},
    	{name: 'Ordner FoxIcons2', path: 'C:\\FoxIcons2'},
    	{name: 'Installationsordner', path: 'C:\\Program Files\\Mozilla Firefox'},
    	
      ],
    
      init: function() {
        for (var i = 0; i < this.apps.length; i++) {
          if (!this.apps[i].path) continue;
          if (!this.apps[i].args) this.apps[i].args = [];
    
          this.apps[i].path = this.apps[i].path.replace(/\//g, '\\');
    
          var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
          if (/^(\\)/.test(this.apps[i].path)) {
            this.apps[i].path = ffdir.substr(0, 2) + this.apps[i].path;
          } else if (/^(\.)/.test(this.apps[i].path)) {
            this.apps[i].path = ffdir + '\\' + this.apps[i].path;
          }
        }
    	
        if (location.href !== 'chrome://browser/content/browser.xhtml') return;
    
        if (this.type == 'menu') {
          var mainmenu = document.getElementById('nav-bar');
          var menu = mainmenu.appendChild(document.createXULElement('menu'));
          menu.setAttribute('label', 'Start');
          menu.setAttribute('accesskey', 'a');
    
          var menupopup = menu.appendChild(document.createXULElement('menupopup'));
          for (var i = 0; i < this.apps.length; i++) {
            menupopup.appendChild(this.createMenuitem(this.apps[i]));
          }
        } else {
          var menubarItems = document.getElementById(this.insertafter);
          var toolbaritem = menubarItems.parentNode.insertBefore(document.createXULElement('toolbaritem'), menubarItems.nextSibling);
          toolbaritem.id = 'ExtAppButtons';
          toolbaritem.setAttribute("class", "chromeclass-toolbar-additional");
          toolbaritem.setAttribute("orient", "horizontal");
          for (var i = 0; i < this.apps.length; i++) {
            toolbaritem.appendChild(this.createButton(this.apps[i]));
          }
        }
      },
    
      exec: function(path, args) {
        for (var i=0; i<args.length; i++) {
          args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
        }
    
        var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
        file.initWithPath(path);
        if (!file.exists()) {
          throw 'File Not Found: ' + path;
        }
    
        if (!file.isExecutable() || args.length==0) {
          file.launch();
        }
        else {
          var process = Cc['@mozilla.org/process/util;1'].getService(Ci.nsIProcess);
          process.init(file);
          process.run(false, args, args.length);
        }
      },
    
      createButton: function(app) {
        if (app.name == 'separator')
          return document.createXULElement('toolbarseparator');
    
        if (location.href !== 'chrome://browser/content/browser.xhtml') return;
    
        var item = document.createXULElement('toolbarbutton');
        item.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional');
        item.setAttribute('label', app.name);
        item.setAttribute('image', 'moz-icon:file:///' + encodeURIComponent(app.path) + '?size=16');
    
        item.addEventListener('command', function(event) {
          if (event.button == 0) {
            gExternalApplications.exec(this.path, this.args);
          }
        });
    
        item.path = app.path;
        item.args = app.args;
        return item;
      },
    
      createMenuitem: function(app) {
        if (app.name == 'separator')
          return document.createXULElement('menuseparator');
    
        var item = document.createXULElement('menuitem');
        item.setAttribute('class', 'menuitem-iconic');
        item.setAttribute('label', app.name);
        item.setAttribute('image', 'moz-icon:file:///' + encodeURIComponent(app.path) + '?size=16');
    
        item.addEventListener('command', function(event) {
          if (event.button == 0) {
            gExternalApplications.exec(this.path, this.args);
          }
        });
    
        item.path = app.path;
        item.args = app.args;
        return item;
      }
    };
    
    gExternalApplications.init();
    Alles anzeigen

    Wie man den "Button" jetzt noch verschiebbar bekommt, weiß ich noch nicht.

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

    • Mira_Belle
    • 3. August 2025 um 11:45
    Zitat von 2002Andreas

    Sorry der Nachfrage, aber wo finde ich das :/

    Habe ich mich auch gefragt! Wollte es erst einmal in FF 141 testen,
    aber worauf muss ich klicken, damit das Menü erscheint?

    Nachtrag.
    Ah, danke für die Erklärung.
    Das ist mir dann aber doch etwas zu viel. Wäre es einfach nur ein Button oder so, aber ...

  • Öffnen aktuell aktive Tab in einem privaten Fenster (Skript)

    • Mira_Belle
    • 2. August 2025 um 12:11

    Ich vermute, ich verstehe das falsch, aber im Kontextmenü gibt es doch einen Eintrag "Link in neuem privaten Fenster öffnen".

    Ich vermute, dass Skript soll wohl einen "privaten" Tab öffnen, richtig?

  • Symbolabstände in einigen Menüs und Kontextmenüs zu groß

    • Mira_Belle
    • 2. August 2025 um 12:06
    Zitat von bananovic

    Natürlich kann mein FF JS. Ich verwende auch andere Scripts, wie z.B. RestartFirefox_plus.uc.js. Was fehlt denn, wenn FF kein JS kann?

    Dann weiß ich auch nicht! Kontrolliere noch einmal ganz genau den Pfad!
    Oder nutze zum Testen einfach mal "interne" Symbole.

  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 22:40
    Zitat von 2002Andreas

    Wo soll etwas unsichtbar werden?

    Meinst du hier das badge?

    Na dann schau Dir noch einmal Dein Sceenshot an.

    Beitrag

    RE: ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    […]



    und im rechten Teil fehlen die Haken.

    So sieht das in Fx 141 aus:

    2002Andreas
    1. August 2025 um 16:42


    FuchsFan

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

    für Tests setze ganz einfach "interne" Symbole
    oder schaue hier:

    Beitrag

    RE: Symbole in den Kontextmenüs [ Update ]

    Neu ab Version 141!

    (Quelltext, 881 Zeilen)

    icons_4.zip
    Mira_Belle
    22. Juli 2025 um 21:30
  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 20:51

    UND visibility: hidden; getestet, funzt nicht!

  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 20:33

    Endor Schau mal. Ist das i.O. für Dich?

    Ok, alle komischen "Kästchen" sind weg!
    Lösung ist zwar nicht besonders schön, aber funktioniert.

    JavaScript
    /* Firefox userChrome script
     * Shortcut menu to modify about:config entries
     * Tested on Firefox 143+
     * Author: garywill (https://garywill.github.io)
     * Edited by: Mira 
     * Souce: https://www.camp-firefox.de/forum/thema/139664/?postID=1276403#post1276403 
     */
    
    // ==UserScript==
    // @include         main
    // @onlyonce
    // ==/UserScript==
    
    console.log("aboutconfig_menu.uc.js");
    
    (() => {
      
    
        const prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
        ChromeUtils.importESModule("resource:///modules/CustomizableUI.sys.mjs")
        const sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
        // ---------------------------------------------------------------------------------------
        
        const button_label = "about:config Kontextmenü";
        const cssuri_icon = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
            toolbarbutton#aboutconfig-button .toolbarbutton-icon {
                list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljCiAgIC0gTGljZW5zZSwgdi4gMi4wLiBJZiBhIGNvcHkgb2YgdGhlIE1QTCB3YXMgbm90IGRpc3RyaWJ1dGVkIHdpdGggdGhpcwogICAtIGZpbGUsIFlvdSBjYW4gb2J0YWluIG9uZSBhdCBodHRwOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxwYXRoIGZpbGw9ImNvbnRleHQtZmlsbCIgZD0iTTEzLjkgOS44MWExLjIzIDEuMjMgMCAwIDAgMC0uMTd2LS4wOGE1LjY3IDUuNjcgMCAwIDAtMi40LTMuMzYgMS4xNyAxLjE3IDAgMCAxLS41Ni0uOTVWM2ExIDEgMCAwIDAtMS0xSDYuMDZhMSAxIDAgMCAwLTEgMXYyLjI1YTEuMTcgMS4xNyAwIDAgMS0uNTYgMSA1LjY2IDUuNjYgMCAwIDAtMi4zNSAzLjMzdi4xMmEuNTMuNTMgMCAwIDAgMCAuMTEgNS4zNSA1LjM1IDAgMCAwLS4xMSAxIDUuNjUgNS42NSAwIDAgMCAzLjI0IDUuMDkgMSAxIDAgMCAwIC40NC4xaDQuNTdhMSAxIDAgMCAwIC40NC0uMUE1LjY1IDUuNjUgMCAwIDAgMTQgMTAuODNhNS4zIDUuMyAwIDAgMC0uMS0xLjAyem0tOC4yNy0yYTMuMTggMy4xOCAwIDAgMCAxLjQzLTIuNlY0aDEuODh2MS4yNWEzLjE4IDMuMTggMCAwIDAgMS40MyAyLjYgMy42OCAzLjY4IDAgMCAxIDEuNTQgMi4yNHYuMjJhMi44MiAyLjgyIDAgMCAxLTMuNjgtLjU5QTMuNDggMy40OCAwIDAgMCA0LjU2IDlhMy43NiAzLjc2IDAgMCAxIDEuMDctMS4xNXoiPjwvcGF0aD48L3N2Zz4=");
            }
            toolbarbutton#aboutconfig-button .toolbarbutton-badge {
                background-color: #009f00;
                visibility: hidden; 
            }
                
            menuitem[checked="true"] > .menu-icon {
                -moz-context-properties: fill, fill-opacity;
            /*    fill: currentColor; */
                fill:rgb(0, 255, 0) !important;
                fill-opacity: var(--menu-icon-opacity);
                --menuitem-icon: url("chrome://global/skin/icons/menu-check.svg")!important;
            }
    
             menuitem[checked="false"] > .menu-icon {
                    -moz-context-properties: fill, fill-opacity;
                    fill: transparent !important;
                    fill-opacity: var(--menu-icon-opacity);
                    --menuitem-icon: url("chrome://global/skin/icons/menu-check.svg")!important;
            }
    
            menuitem[label="Zurücksetzen: 0"] > .menu-icon,
            menuitem[label="Zurücksetzen: 1"] > .menu-icon, 
            menuitem[label="Zurücksetzen: 100"] > .menu-icon,
            menuitem[label="Zurücksetzen: ''"] > .menu-icon,    
            menuitem[label="Zurücksetzen: 'normal'"] > .menu-icon,           
            menuitem[label="Zurücksetzen: false"] > .menu-icon,            
            menuitem[label="Zurücksetzen: true"] > .menu-icon {
                -moz-context-properties: fill, fill-opacity;
                fill: transparent !important;
                fill-opacity: var(--menu-icon-opacity);
                --menuitem-icon: url("chrome://global/skin/icons/menu-check.svg")!important;
            }
        `), null, null);
                
        const cssuri_warnbadge = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
            toolbarbutton#aboutconfig-button .toolbarbutton-badge {
                background-color:rgb(255, 0, 0);
                visibility: unset;
            } 
        `), null, null);
       
        sss.loadAndRegisterSheet(cssuri_icon, sss.USER_SHEET);
      
        
        var prefItems = [ 
    	{
                name: "📼 Kein automatisches Popup beim Download",
                type: prefs.PREF_BOOL,
                pref: "browser.download.alwaysOpenPanel",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    	{
                name: "🎞️ Beim Schließen vom letzten Tab den Browser nicht schließen",
                type: prefs.PREF_BOOL,
                pref: "browser.tabs.closeWindowWithLastTab",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    		"seperator",
    	{
                name: "🔎 Suche aus Suchleiste im neuen Tab öffnen",
                type: prefs.PREF_BOOL,
                pref: "browser.search.openintab",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    	{
                name: "📖 Lesezeichen im neuen Tab öffnen",
                type: prefs.PREF_BOOL,
                pref: "browser.tabs.loadBookmarksInTabs",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    	{
                name: "📖 Link aus Adressleiste im neuen Tab öffnen",
                type: prefs.PREF_BOOL,
                pref: "browser.urlbar.openintab",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    		"seperator",
    	{
                name: "🎊 Animations Modus",
                type: prefs.PREF_STRING,
                pref: "image.animation_mode",
                possibleVals: [
                    { name: "Einmal", val: "once" },
                    { name: "Keine", val: "none" },
                    { name: "Dauerhaft", val: "normal" },
                ]
            },
    	     "seperator", 
    		{
                name: "🔏 CSP aktivieren - deaktivieren",
                type: prefs.PREF_BOOL,
                pref: "security.browser_xhtml_csp.enabled",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
    		{
                name: "🔏 Urlbar Verhalten - deaktivieren",
                type: prefs.PREF_BOOL,
                pref: "browser.urlbar.scotchBonnet.enableOverride",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },		
    		{
                name: "🔏 eval erlauben - verbieten",
                type: prefs.PREF_BOOL,
                pref: "security.allow_unsafe_dangerous_privileged_evil_eval",
                possibleVals: [
                    {  val: false  },
                    {  name: "true ⚠️",  val: true , sign: '‼️' },
                ]
    		},	
            {
                name: "🌐 IPv6 ausschalten",
                type: prefs.PREF_BOOL,
                pref: "network.dns.disableIPv6",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
            {
                name: "🔐 DNS Modus",
                type: prefs.PREF_INT,
                pref: "network.trr.mode",
                possibleVals: [
                    { name: "0 - Default" , val: 0 },
                    { name: "2 - DoH, fallback Plain DNS" , val: 2 },
                    { name: "3 - DoH only" , val: 3 }, 
                    { name: "5 - Plain DNS" , val: 5 }
                ]
            },
            {
                name: "🔐 DoH server",
                type: prefs.PREF_STRING,
                pref: "network.trr.uri",
                possibleVals: [
                    { name: "Cloudflare" , val: "https://mozilla.cloudflare-dns.com/dns-query" },
                    { name: "NextDNS" , val: "https://firefox.dns.nextdns.io/" }
                ] // See buildin DoH at 'network.trr.resolvers'
            },
            {
                name: "🔏 Veraltete TLS Version aktivieren",
                type: prefs.PREF_BOOL,
                pref: "security.tls.version.enable-deprecated",
                possibleVals: [
                    { val: false  },
                    { name: "true ⚠️",  val: true , sign: '‼️'},
                ]
            },
    
            "seperator",    
            {
                name: "🖱️ Mausrad-Y-Multiplikator",
                type: prefs.PREF_INT,
                pref: "mousewheel.default.delta_multiplier_y",
                possibleVals: [
                    { val: 150 },
                ]
            },
            {
                name: "🖱️ Vertikaler Faktor des Systembildlaufes",
                type: prefs.PREF_INT,
                pref: "mousewheel.system_scroll_override.vertical.factor",
                possibleVals: [
                    { val: 250 },
                ]
            },
    
    
            "seperator",    
            {
                name: "▶️ Autoplay Medien Standard",
                type: prefs.PREF_INT,
                pref: "media.autoplay.default",
                possibleVals: [
                    { val: 0, name: "0 - allow" },
                    { val: 1, name: "1 - blockAudible 👍" },
                    { val: 5, name: "5 - blockAll" },
                ]
            },
    		{
                name: "📺 Videos gesperrt - Videos frei",
                type: prefs.PREF_BOOL,
                pref: "media.mediasource.enabled",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
            {
                name: "▶️ Media Autoplay ext bg",
                type: prefs.PREF_BOOL,
                pref: "media.autoplay.allow-extension-background-pages",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
            {
                name: "▶️ Richtlinien zur Sperrung von Autoplay-Medien",
                type: prefs.PREF_INT,
                pref: "media.autoplay.blocking_policy",
                possibleVals: [
                    { val: 0, name: "0 - no block" },
                    { val: 1, name: "1 - block 👍" },
                    { val: 2, name: "2 - block more" },
                    // 0=sticky (default), 1=transient, 2=user
                ]
            },
            {
                name: "▶️ InternetAudio",
                type: prefs.PREF_BOOL,
                pref: "dom.webaudio.enabled",
                possibleVals: [
                    {  val: false },
                    {  val: true  ,  sign: '‼️' , warnbadge: true},
                ]
            },
    
            "seperator",    
            {
                name: "🔤 Benutzerdefinierte Web-Schriften zulassen",
                type: prefs.PREF_INT,
                pref: "browser.display.use_document_fonts",
                possibleVals: [
                    { name: "1 - Allow", val: 1 },
                    { name: "0 - Disallow", val: 0 },
                ]
            },
             {
                name: "💻 Keine Popup Anmeldung für Browser-Werkzeuge",
                type: prefs.PREF_BOOL,
                pref: "devtools.debugger.prompt-connection",
                possibleVals: [
                    {  val: true  },
                    { name: "false ⚠️",   val: false , sign: '‼️' },
                ]
            },
            {
                name: "🔏 Tooltips aktivieren - deaktivieren",
                type: prefs.PREF_BOOL,
                pref: "browser.chrome.toolbar_tips",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
    		 "seperator",
    		{
                name: "💻 Popups nicht automatisch schließen",
                type: prefs.PREF_BOOL,
                pref: "ui.popup.disable_autohide",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
        ];
    	
    	if (!window.gBrowser){
        return;
        }
        
        CustomizableUI.createWidget({
            id: 'aboutconfig-button', // button id
            type: "custom",
            defaultArea: CustomizableUI.AREA_NAVBAR,
            removable: true,
            onBuild: function (doc) {
                let btn = doc.createXULElement('toolbarbutton');
                btn.id = 'aboutconfig-button';
                btn.label = button_label;
                btn.tooltipText = button_label;
                btn.type = 'menu';
                btn.className = 'toolbarbutton-1 chromeclass-toolbar-additional';
                btn.setAttribute("badged", "true"); 
                btn.setAttribute("badge", "!"); 
                
                let mp = doc.createXULElement("menupopup");
                mp.id = 'aboutconfig-popup';
                mp.onclick = function(event) {  event.preventDefault()  ;} ;
                
    
                
                prefItems.forEach( function (item, items_i) { // loop every user defined pref
                    
                    if (item === "seperator") 
                    {
                        mp.appendChild(doc.createXULElement('menuseparator'));
                        return;
                    }
                    
                    //var current_val = getItemCurrentVal(item) ;
                    var menu = doc.createXULElement("menu");
                    menu.label = item.name ? item.name : item.pref ;
                    menu.id = "aboutconfig_menu_" + items_i ;
                    menu.className = 'menuitem-iconic' ;
                    
                
                    var menupopup = doc.createXULElement("menupopup");
                    menupopup.id = "aboutconfig_menupopup_" + items_i ;
                    menupopup.className = 'menuitem-iconic' ;
                    
    
                    
                    item.possibleVals.forEach( function (pv, i) { // loop every possible value
                        
                        var display_val = prefPossibleValToDisplay(item, pv.val) ;
                        
                        // Submenu item. One is one possible value
                        var menuitem = doc.createXULElement("menuitem");
                        menuitem.label = pv.name ? pv.name : display_val ;
                        menuitem.id = "aboutconfig_menu_" + items_i + "__" + i  ;
                        menuitem.setAttribute('type', 'radio') ;
                        menuitem.className = 'menuitem-iconic' ;
                        menuitem.tooltipText = display_val ;
    
                        if (pv ['sign'])
                            menuitem.label += '  ' + pv['sign']; 
                        
                        
                        menuitem.addEventListener('click', function(event) { 
                            //console.log(this.id); 
                            setItemPrefVal(item , pv.val);
                        } ) ;
                        menupopup.appendChild(menuitem);
                        
                    });           
                                    
                    var default_val = getItemDefaultVal(item);
                    var default_val_display = null;
                    var reset_label = "Zurücksetzen: ";
                    if (item.signWhenDefaultVal)
                        reset_label += item.signWhenDefaultVal + ' ' ;
                    if (default_val !== undefined && default_val !== null)
                    {
                        default_val_display = prefPossibleValToDisplay(item, default_val);
                        reset_label += default_val_display ;
                    }
                    else
                        reset_label += ' (delete in about:config)'
                    
                    menupopup.appendChild(
                        doc.createXULElement('menuseparator')
                    );
                    
                    // Submenu entry to reset a pref to default
                    var default_item = doc.createXULElement("menuitem");
                    default_item.id = "aboutconfig_menu_" + items_i + "__default" ;
                    default_item.className = 'menuitem-iconic';
                    default_item.label = reset_label;
                    default_item.tooltipText = default_val_display;
    
                    default_item.addEventListener('click', function(event) { 
                        //console.log(this.id); 
                        //setItemPrefVal(item , getItemDefaultVal(item) );
                        prefs.clearUserPref(item.pref);
                    } ) ;
                    
                    menupopup.appendChild(default_item);
                    
                    //------------
                    menu.appendChild(menupopup);
                    mp.appendChild(menu);
                    
                    
                });
                
                btn.appendChild(mp);
    
                mp.addEventListener('popupshowing', function() { 
                    //console.log(this);
                    evalPopulateMenu(this); 
                    
                    update_badge();
                    
                });
    
                btn.onclick = function(event) {
                    if (event.button == 1) {
                        const win = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                            .getService(Components.interfaces.nsIWindowMediator)
                            .getMostRecentWindow("navigator:browser");
                        win.gBrowser.selectedTab = win.gBrowser.addTrustedTab('about:config');
                    }
                    
                    update_badge();
                };
                
                return btn;
            }
        });
        
        function getItemDefaultVal (item) {
            var default_val = undefined;
            try{
                if ( item.type == prefs.PREF_BOOL )
                    default_val = prefs.getDefaultBranch(item.pref).getBoolPref('');
                else if ( item.type == prefs.PREF_INT )
                    default_val = prefs.getDefaultBranch(item.pref).getIntPref('');
                else if ( item.type == prefs.PREF_STRING )
                    default_val = prefs.getDefaultBranch(item.pref).getStringPref('');
            }catch(err) { default_val = null }
            
            return default_val;
        }
        function getItemCurrentVal (item) {
            var current_val = null;
            try{
                if ( item.type == prefs.PREF_BOOL )
                    current_val = prefs.getBoolPref(item.pref);
                else if ( item.type == prefs.PREF_INT )
                    current_val = prefs.getIntPref(item.pref);
                else if ( item.type == prefs.PREF_STRING )
                    current_val = prefs.getStringPref(item.pref);
            }catch(err){ }
            return current_val ;
        }
        
        function if_pref_current_val_is (item, pv_index) {
            var current_val = getItemCurrentVal(item) ;
            if (current_val === null)
                return false;
            
            if ( current_val === item.possibleVals[pv_index].val )
                return true;
            else 
                return false;
        }
        
        function setItemPrefVal(item, newVal)
        {
            if ( item.type == prefs.PREF_BOOL )
                prefs.setBoolPref(item.pref, newVal);
            else if ( item.type == prefs.PREF_INT )
                prefs.setIntPref(item.pref, newVal);
            else if ( item.type == prefs.PREF_STRING )
                prefs.setStringPref(item.pref, newVal);
            
            update_badge();
        }
        function prefPossibleValToDisplay(item, possible_val ) {
            if (possible_val === null) 
                return "null";
            
            var display_val = possible_val.toString();
            if (item.type == prefs.PREF_STRING)
                display_val = `'${display_val}'`;
            
            return display_val;
        }
        
        function evalPopulateMenu(popupmenu)
        {
            prefItems.forEach( function (item, items_i) {
                if (item === "seperator") 
                    return;
                
                const menu = popupmenu.querySelector("#aboutconfig_menu_" + items_i);
                menu.label = item.name ? item.name : item.pref ;
                menu.style.fontWeight = "";
                
                const default_val = getItemDefaultVal(item);
                        
                var current_val = getItemCurrentVal(item) ;
                var current_val_display = prefPossibleValToDisplay(item, current_val);
                menu.tooltipText = `Pref: ${item.pref}\nValue: ${current_val_display}`;
                
                if (current_val !== null)
                {
                    if (item.type == prefs.PREF_BOOL) 
                        menu.label += '  [' + ( current_val?'T':'F' ) + ']';
                    else if (item.type == prefs.PREF_INT) 
                        menu.label += '  [' + current_val + ']';
                    else if (item.type == prefs.PREF_STRING) {
                        var current_val_display_short;
                        
                        if (current_val.length > 8)
                            current_val_display_short = current_val.substring(0, 6) + '..'; 
                        else 
                            current_val_display_short = current_val;
                        
                        menu.label += '  [' + current_val_display_short + ']';
                    }
                } 
                
                if (current_val !== default_val)
                    menu.style.fontWeight = "bold";
                
                if (current_val === default_val && item.signWhenDefaultVal)
                    menu.label += '  ' + item.signWhenDefaultVal;
    
                
                item.possibleVals.forEach( function (pv, i) {
                    menuitem = popupmenu.querySelector("#aboutconfig_menu_" + items_i + "__" + i);
                    if ( if_pref_current_val_is(item, i) )
                    { 
                        menuitem.setAttribute("checked",true);
                     
                        if (pv ['sign'])
                            menu.label += '  ' + pv['sign'];
                    }
                    else 
                        menuitem.setAttribute("checked",false);
                });
            });
        }
        
        function add_warnbadge()
        {
            if ( ! sss.sheetRegistered(cssuri_warnbadge, sss.USER_SHEET) )
                 sss.loadAndRegisterSheet(cssuri_warnbadge, sss.USER_SHEET);
        }
        function rm_warnbadge()
        {
            if ( sss.sheetRegistered(cssuri_warnbadge, sss.USER_SHEET) )
                 sss.unregisterSheet(cssuri_warnbadge, sss.USER_SHEET);
        }
        
        update_badge();
        async function update_badge()
        {
            
            var show_warnbadge = false;
            
            for (item of prefItems)
            {
                if (typeof(item) === "string")
                    continue;
                
                const current_val = getItemCurrentVal(item) ;
                if (
                    item.possibleVals.some ( function(ele) {
                        return ( ele ['val'] === current_val && ele ['warnbadge'] && ele ['warnbadge'] === true );
                    } )
                )
                {
                    show_warnbadge = true;
                    break;
                }
            }
                 
            
            if (show_warnbadge)
                add_warnbadge();
            else 
                rm_warnbadge();
        }
        
        
    })();
    Alles anzeigen
  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 19:52

    Das Skript funktioniert auch ohne:!:

  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 19:32

    uuuunnnddd...

    Das "Kästchen" wenn Option nicht ausgewählt auch weg bekommen!

    JavaScript
        const cssuri_icon = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
                toolbarbutton#aboutconfig-button .toolbarbutton-icon {
                    list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljCiAgIC0gTGljZW5zZSwgdi4gMi4wLiBJZiBhIGNvcHkgb2YgdGhlIE1QTCB3YXMgbm90IGRpc3RyaWJ1dGVkIHdpdGggdGhpcwogICAtIGZpbGUsIFlvdSBjYW4gb2J0YWluIG9uZSBhdCBodHRwOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxwYXRoIGZpbGw9ImNvbnRleHQtZmlsbCIgZD0iTTEzLjkgOS44MWExLjIzIDEuMjMgMCAwIDAgMC0uMTd2LS4wOGE1LjY3IDUuNjcgMCAwIDAtMi40LTMuMzYgMS4xNyAxLjE3IDAgMCAxLS41Ni0uOTVWM2ExIDEgMCAwIDAtMS0xSDYuMDZhMSAxIDAgMCAwLTEgMXYyLjI1YTEuMTcgMS4xNyAwIDAgMS0uNTYgMSA1LjY2IDUuNjYgMCAwIDAtMi4zNSAzLjMzdi4xMmEuNTMuNTMgMCAwIDAgMCAuMTEgNS4zNSA1LjM1IDAgMCAwLS4xMSAxIDUuNjUgNS42NSAwIDAgMCAzLjI0IDUuMDkgMSAxIDAgMCAwIC40NC4xaDQuNTdhMSAxIDAgMCAwIC40NC0uMUE1LjY1IDUuNjUgMCAwIDAgMTQgMTAuODNhNS4zIDUuMyAwIDAgMC0uMS0xLjAyem0tOC4yNy0yYTMuMTggMy4xOCAwIDAgMCAxLjQzLTIuNlY0aDEuODh2MS4yNWEzLjE4IDMuMTggMCAwIDAgMS40MyAyLjYgMy42OCAzLjY4IDAgMCAxIDEuNTQgMi4yNHYuMjJhMi44MiAyLjgyIDAgMCAxLTMuNjgtLjU5QTMuNDggMy40OCAwIDAgMCA0LjU2IDlhMy43NiAzLjc2IDAgMCAxIDEuMDctMS4xNXoiPjwvcGF0aD48L3N2Zz4=");
                }
                toolbarbutton#aboutconfig-button .toolbarbutton-badge {
                    background-color: #009f00;
                    visibility: hidden; 
                }      
    
    			@media (-moz-platform: windows) {
                    menuitem[checked="true"] > .menu-icon {
                    -moz-context-properties: fill, fill-opacity;
                /*    fill: currentColor; */
                    fill:rgb(0, 255, 0) !important;
                    fill-opacity: var(--menu-icon-opacity);
                    --menuitem-icon: url("chrome://global/skin/icons/menu-check.svg")!important;
                    }
                }
    			@media (-moz-platform: windows) {
                    menuitem[checked="false"] > .menu-icon {
                    -moz-context-properties: fill, fill-opacity;
                    fill:#ffff0000 !important;
                    fill-opacity: var(--menu-icon-opacity);
                    --menuitem-icon: url("chrome://global/skin/icons/menu-check.svg")!important;
                    }
                }            }
                `), null, null);
    Alles anzeigen

    Woran ich mir aber gerade die Zähne ausbeiße, das "Kästchen" bei Zurücksetzen: ...

  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 19:15

    2002Andreas Klasse Idee! Jetzt müssten nur noch die "Kästchen" weg.
    Habe mir erlaubt klitze kleine Veränderungen vor zu nehmen.
    Häkchen ist jetzt grün,
    und das background-image: in Zeile 38 habe ich durch --menuitem-icon: ersetzt.

    JavaScript
    /* Firefox userChrome script
     * Shortcut menu to modify about:config entries
     * Tested on Firefox 132+
     * Author: garywill (https://garywill.github.io)
     * 
     */
    
    // ==UserScript==
    // @include         main
    // @onlyonce
    // ==/UserScript==
    
    console.log("aboutconfig_menu.uc.js");
    
    (() => {
      
    
        const prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
        ChromeUtils.importESModule("resource:///modules/CustomizableUI.sys.mjs")
        const sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
        // ---------------------------------------------------------------------------------------
        
        const button_label = "about:config Kontextmenü";
        const cssuri_icon = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
                toolbarbutton#aboutconfig-button .toolbarbutton-icon {
                    list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljCiAgIC0gTGljZW5zZSwgdi4gMi4wLiBJZiBhIGNvcHkgb2YgdGhlIE1QTCB3YXMgbm90IGRpc3RyaWJ1dGVkIHdpdGggdGhpcwogICAtIGZpbGUsIFlvdSBjYW4gb2J0YWluIG9uZSBhdCBodHRwOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiPjxwYXRoIGZpbGw9ImNvbnRleHQtZmlsbCIgZD0iTTEzLjkgOS44MWExLjIzIDEuMjMgMCAwIDAgMC0uMTd2LS4wOGE1LjY3IDUuNjcgMCAwIDAtMi40LTMuMzYgMS4xNyAxLjE3IDAgMCAxLS41Ni0uOTVWM2ExIDEgMCAwIDAtMS0xSDYuMDZhMSAxIDAgMCAwLTEgMXYyLjI1YTEuMTcgMS4xNyAwIDAgMS0uNTYgMSA1LjY2IDUuNjYgMCAwIDAtMi4zNSAzLjMzdi4xMmEuNTMuNTMgMCAwIDAgMCAuMTEgNS4zNSA1LjM1IDAgMCAwLS4xMSAxIDUuNjUgNS42NSAwIDAgMCAzLjI0IDUuMDkgMSAxIDAgMCAwIC40NC4xaDQuNTdhMSAxIDAgMCAwIC40NC0uMUE1LjY1IDUuNjUgMCAwIDAgMTQgMTAuODNhNS4zIDUuMyAwIDAgMC0uMS0xLjAyem0tOC4yNy0yYTMuMTggMy4xOCAwIDAgMCAxLjQzLTIuNlY0aDEuODh2MS4yNWEzLjE4IDMuMTggMCAwIDAgMS40MyAyLjYgMy42OCAzLjY4IDAgMCAxIDEuNTQgMi4yNHYuMjJhMi44MiAyLjgyIDAgMCAxLTMuNjgtLjU5QTMuNDggMy40OCAwIDAgMCA0LjU2IDlhMy43NiAzLjc2IDAgMCAxIDEuMDctMS4xNXoiPjwvcGF0aD48L3N2Zz4=");
                }
                toolbarbutton#aboutconfig-button .toolbarbutton-badge {
                    background-color: #009f00;
                    visibility: hidden; 
                }      
    
    			@media (-moz-platform: windows) {
                    menuitem[checked="true"] > .menu-icon {
                    -moz-context-properties: fill, fill-opacity;
                /*    fill: currentColor; */
                    fill:rgb(0, 255, 0) !important;
                    fill-opacity: var(--menu-icon-opacity);
                    --menuitem-icon: url("chrome://global/skin/icons/menu-check.svg")!important;
                }
                }
                `), null, null);
                
        const cssuri_warnbadge = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
                toolbarbutton#aboutconfig-button .toolbarbutton-badge {
                    background-color:rgb(255, 0, 0);
                    visibility: unset;
                } 
                `), null, null);
       
        sss.loadAndRegisterSheet(cssuri_icon, sss.USER_SHEET);
      
        
        var prefItems = [ 
    	{
                name: "📼 Kein automatisches Popup beim Download",
                type: prefs.PREF_BOOL,
                pref: "browser.download.alwaysOpenPanel",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    	{
                name: "🎞️ Beim Schließen vom letzten Tab den Browser nicht schließen",
                type: prefs.PREF_BOOL,
                pref: "browser.tabs.closeWindowWithLastTab",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    		"seperator",
    	{
                name: "🔎 Suche aus Suchleiste im neuen Tab öffnen",
                type: prefs.PREF_BOOL,
                pref: "browser.search.openintab",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    	{
                name: "📖 Lesezeichen im neuen Tab öffnen",
                type: prefs.PREF_BOOL,
                pref: "browser.tabs.loadBookmarksInTabs",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    	{
                name: "📖 Link aus Adressleiste im neuen Tab öffnen",
                type: prefs.PREF_BOOL,
                pref: "browser.urlbar.openintab",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
    		"seperator",
    	{
                name: "🎊 Animations Modus",
                type: prefs.PREF_STRING,
                pref: "image.animation_mode",
                possibleVals: [
                    { name: "Einmal", val: "once" },
                    { name: "Keine", val: "none" },
                    { name: "Dauerhaft", val: "normal" },
                ]
            },
    	     "seperator", 
    		{
                name: "🔏 CSP aktivieren - deaktivieren",
                type: prefs.PREF_BOOL,
                pref: "security.browser_xhtml_csp.enabled",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
    		{
                name: "🔏 Urlbar Verhalten - deaktivieren",
                type: prefs.PREF_BOOL,
                pref: "browser.urlbar.scotchBonnet.enableOverride",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },		
    		{
                name: "🔏 eval erlauben - verbieten",
                type: prefs.PREF_BOOL,
                pref: "security.allow_unsafe_dangerous_privileged_evil_eval",
                possibleVals: [
                    {  val: false  },
                    {  name: "true ⚠️",  val: true , sign: '‼️' },
                ]
    		},	
            {
                name: "🌐 IPv6 ausschalten",
                type: prefs.PREF_BOOL,
                pref: "network.dns.disableIPv6",
                possibleVals: [
                    {  val: false },
                    {  val: true },
                ]
            },
            {
                name: "🔐 DNS Modus",
                type: prefs.PREF_INT,
                pref: "network.trr.mode",
                possibleVals: [
                    { name: "0 - Default" , val: 0 },
                    { name: "2 - DoH, fallback Plain DNS" , val: 2 },
                    { name: "3 - DoH only" , val: 3 }, 
                    { name: "5 - Plain DNS" , val: 5 }
                ]
            },
            {
                name: "🔐 DoH server",
                type: prefs.PREF_STRING,
                pref: "network.trr.uri",
                possibleVals: [
                    { name: "Cloudflare" , val: "https://mozilla.cloudflare-dns.com/dns-query" },
                    { name: "NextDNS" , val: "https://firefox.dns.nextdns.io/" }
                ] // See buildin DoH at 'network.trr.resolvers'
            },
            {
                name: "🔏 Veraltete TLS Version aktivieren",
                type: prefs.PREF_BOOL,
                pref: "security.tls.version.enable-deprecated",
                possibleVals: [
                    { val: false  },
                    { name: "true ⚠️",  val: true , sign: '‼️'},
                ]
            },
    
            "seperator",    
            {
                name: "🖱️ Mausrad-Y-Multiplikator",
                type: prefs.PREF_INT,
                pref: "mousewheel.default.delta_multiplier_y",
                possibleVals: [
                    { val: 150 },
                ]
            },
            {
                name: "🖱️ Vertikaler Faktor des Systembildlaufes",
                type: prefs.PREF_INT,
                pref: "mousewheel.system_scroll_override.vertical.factor",
                possibleVals: [
                    { val: 250 },
                ]
            },
    
    
            "seperator",    
            {
                name: "▶️ Autoplay Medien Standard",
                type: prefs.PREF_INT,
                pref: "media.autoplay.default",
                possibleVals: [
                    { val: 0, name: "0 - allow" },
                    { val: 1, name: "1 - blockAudible 👍" },
                    { val: 5, name: "5 - blockAll" },
                ]
            },
    		{
                name: "📺 Videos gesperrt - Videos frei",
                type: prefs.PREF_BOOL,
                pref: "media.mediasource.enabled",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
            {
                name: "▶️ Media Autoplay ext bg",
                type: prefs.PREF_BOOL,
                pref: "media.autoplay.allow-extension-background-pages",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
            {
                name: "▶️ Richtlinien zur Sperrung von Autoplay-Medien",
                type: prefs.PREF_INT,
                pref: "media.autoplay.blocking_policy",
                possibleVals: [
                    { val: 0, name: "0 - no block" },
                    { val: 1, name: "1 - block 👍" },
                    { val: 2, name: "2 - block more" },
                    // 0=sticky (default), 1=transient, 2=user
                ]
            },
            {
                name: "▶️ InternetAudio",
                type: prefs.PREF_BOOL,
                pref: "dom.webaudio.enabled",
                possibleVals: [
                    {  val: false },
                    {  val: true  ,  sign: '‼️' , warnbadge: true},
                ]
            },
    
            "seperator",    
            {
                name: "🔤 Benutzerdefinierte Web-Schriften zulassen",
                type: prefs.PREF_INT,
                pref: "browser.display.use_document_fonts",
                possibleVals: [
                    { name: "1 - Allow", val: 1 },
                    { name: "0 - Disallow", val: 0 },
                ]
            },
             {
                name: "💻 Keine Popup Anmeldung für Browser-Werkzeuge",
                type: prefs.PREF_BOOL,
                pref: "devtools.debugger.prompt-connection",
                possibleVals: [
                    {  val: true  },
                    { name: "false ⚠️",   val: false , sign: '‼️' },
                ]
            },
            {
                name: "🔏 Tooltips aktivieren - deaktivieren",
                type: prefs.PREF_BOOL,
                pref: "browser.chrome.toolbar_tips",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
    		 "seperator",
    		{
                name: "💻 Popups nicht automatisch schließen",
                type: prefs.PREF_BOOL,
                pref: "ui.popup.disable_autohide",
                possibleVals: [
                    {  val: false  },
                    {  val: true },
                ]
            },
        ];
    	
    	if (!window.gBrowser){
        return;
        }
        
        CustomizableUI.createWidget({
            id: 'aboutconfig-button', // button id
            type: "custom",
            defaultArea: CustomizableUI.AREA_NAVBAR,
            removable: true,
            onBuild: function (doc) {
                let btn = doc.createXULElement('toolbarbutton');
                btn.id = 'aboutconfig-button';
                btn.label = button_label;
                btn.tooltipText = button_label;
                btn.type = 'menu';
                btn.className = 'toolbarbutton-1 chromeclass-toolbar-additional';
                btn.setAttribute("badged", "true"); 
                btn.setAttribute("badge", "!"); 
                
                let mp = doc.createXULElement("menupopup");
                mp.id = 'aboutconfig-popup';
                mp.onclick = function(event) {  event.preventDefault()  ;} ;
                
    
                
                prefItems.forEach( function (item, items_i) { // loop every user defined pref
                    
                    if (item === "seperator") 
                    {
                        mp.appendChild(doc.createXULElement('menuseparator'));
                        return;
                    }
                    
                    //var current_val = getItemCurrentVal(item) ;
                    var menu = doc.createXULElement("menu");
                    menu.label = item.name ? item.name : item.pref ;
                    menu.id = "aboutconfig_menu_" + items_i ;
                    menu.className = 'menuitem-iconic' ;
                    
                
                    var menupopup = doc.createXULElement("menupopup");
                    menupopup.id = "aboutconfig_menupopup_" + items_i ;
                    menupopup.className = 'menuitem-iconic' ;
                    
    
                    
                    item.possibleVals.forEach( function (pv, i) { // loop every possible value
                        
                        var display_val = prefPossibleValToDisplay(item, pv.val) ;
                        
                        // Submenu item. One is one possible value
                        var menuitem = doc.createXULElement("menuitem");
                        menuitem.label = pv.name ? pv.name : display_val ;
                        menuitem.id = "aboutconfig_menu_" + items_i + "__" + i  ;
                        menuitem.setAttribute('type', 'radio') ;
                        menuitem.className = 'menuitem-iconic' ;
                        menuitem.tooltipText = display_val ;
    
                        if (pv ['sign'])
                            menuitem.label += '  ' + pv['sign']; 
                        
                        
                        menuitem.addEventListener('click', function(event) { 
                            //console.log(this.id); 
                            setItemPrefVal(item , pv.val);
                        } ) ;
                        menupopup.appendChild(menuitem);
                        
                    });           
                                    
                    var default_val = getItemDefaultVal(item);
                    var default_val_display = null;
                    var reset_label = "Zurücksetzen: ";
                    if (item.signWhenDefaultVal)
                        reset_label += item.signWhenDefaultVal + ' ' ;
                    if (default_val !== undefined && default_val !== null)
                    {
                        default_val_display = prefPossibleValToDisplay(item, default_val);
                        reset_label += default_val_display ;
                    }
                    else
                        reset_label += ' (delete in about:config)'
                    
                    menupopup.appendChild(
                        doc.createXULElement('menuseparator')
                    );
                    
                    // Submenu entry to reset a pref to default
                    var default_item = doc.createXULElement("menuitem");
                    default_item.id = "aboutconfig_menu_" + items_i + "__default" ;
                    default_item.className = 'menuitem-iconic';
                    default_item.label = reset_label;
                    default_item.tooltipText = default_val_display;
    
                    default_item.addEventListener('click', function(event) { 
                        //console.log(this.id); 
                        //setItemPrefVal(item , getItemDefaultVal(item) );
                        prefs.clearUserPref(item.pref);
                    } ) ;
                    
                    menupopup.appendChild(default_item);
                    
                    //------------
                    menu.appendChild(menupopup);
                    mp.appendChild(menu);
                    
                    
                });
                
                btn.appendChild(mp);
    
                mp.addEventListener('popupshowing', function() { 
                    //console.log(this);
                    evalPopulateMenu(this); 
                    
                    update_badge();
                    
                });
    
                btn.onclick = function(event) {
                    if (event.button == 1) {
                        const win = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                            .getService(Components.interfaces.nsIWindowMediator)
                            .getMostRecentWindow("navigator:browser");
                        win.gBrowser.selectedTab = win.gBrowser.addTrustedTab('about:config');
                    }
                    
                    update_badge();
                };
                
                return btn;
            }
        });
        
        function getItemDefaultVal (item) {
            var default_val = undefined;
            try{
                if ( item.type == prefs.PREF_BOOL )
                    default_val = prefs.getDefaultBranch(item.pref).getBoolPref('');
                else if ( item.type == prefs.PREF_INT )
                    default_val = prefs.getDefaultBranch(item.pref).getIntPref('');
                else if ( item.type == prefs.PREF_STRING )
                    default_val = prefs.getDefaultBranch(item.pref).getStringPref('');
            }catch(err) { default_val = null }
            
            return default_val;
        }
        function getItemCurrentVal (item) {
            var current_val = null;
            try{
                if ( item.type == prefs.PREF_BOOL )
                    current_val = prefs.getBoolPref(item.pref);
                else if ( item.type == prefs.PREF_INT )
                    current_val = prefs.getIntPref(item.pref);
                else if ( item.type == prefs.PREF_STRING )
                    current_val = prefs.getStringPref(item.pref);
            }catch(err){ }
            return current_val ;
        }
        
        function if_pref_current_val_is (item, pv_index) {
            var current_val = getItemCurrentVal(item) ;
            if (current_val === null)
                return false;
            
            if ( current_val === item.possibleVals[pv_index].val )
                return true;
            else 
                return false;
        }
        
        function setItemPrefVal(item, newVal)
        {
            if ( item.type == prefs.PREF_BOOL )
                prefs.setBoolPref(item.pref, newVal);
            else if ( item.type == prefs.PREF_INT )
                prefs.setIntPref(item.pref, newVal);
            else if ( item.type == prefs.PREF_STRING )
                prefs.setStringPref(item.pref, newVal);
            
            update_badge();
        }
        function prefPossibleValToDisplay(item, possible_val ) {
            if (possible_val === null) 
                return "null";
            
            var display_val = possible_val.toString();
            if (item.type == prefs.PREF_STRING)
                display_val = `'${display_val}'`;
            
            return display_val;
        }
        
        function evalPopulateMenu(popupmenu)
        {
            prefItems.forEach( function (item, items_i) {
                if (item === "seperator") 
                    return;
                
                const menu = popupmenu.querySelector("#aboutconfig_menu_" + items_i);
                menu.label = item.name ? item.name : item.pref ;
                menu.style.fontWeight = "";
                
                const default_val = getItemDefaultVal(item);
                        
                var current_val = getItemCurrentVal(item) ;
                var current_val_display = prefPossibleValToDisplay(item, current_val);
                menu.tooltipText = `Pref: ${item.pref}\nValue: ${current_val_display}`;
                
                if (current_val !== null)
                {
                    if (item.type == prefs.PREF_BOOL) 
                        menu.label += '  [' + ( current_val?'T':'F' ) + ']';
                    else if (item.type == prefs.PREF_INT) 
                        menu.label += '  [' + current_val + ']';
                    else if (item.type == prefs.PREF_STRING) {
                        var current_val_display_short;
                        
                        if (current_val.length > 8)
                            current_val_display_short = current_val.substring(0, 6) + '..'; 
                        else 
                            current_val_display_short = current_val;
                        
                        menu.label += '  [' + current_val_display_short + ']';
                    }
                } 
                
                if (current_val !== default_val)
                    menu.style.fontWeight = "bold";
                
                if (current_val === default_val && item.signWhenDefaultVal)
                    menu.label += '  ' + item.signWhenDefaultVal;
    
                
                item.possibleVals.forEach( function (pv, i) {
                    menuitem = popupmenu.querySelector("#aboutconfig_menu_" + items_i + "__" + i);
                    if ( if_pref_current_val_is(item, i) )
                    { 
                        menuitem.setAttribute("checked",true);
                     
                        if (pv ['sign'])
                            menu.label += '  ' + pv['sign'];
                    }
                    else 
                        menuitem.setAttribute("checked",false);
                });
            });
        }
        
        function add_warnbadge()
        {
            if ( ! sss.sheetRegistered(cssuri_warnbadge, sss.USER_SHEET) )
                 sss.loadAndRegisterSheet(cssuri_warnbadge, sss.USER_SHEET);
        }
        function rm_warnbadge()
        {
            if ( sss.sheetRegistered(cssuri_warnbadge, sss.USER_SHEET) )
                 sss.unregisterSheet(cssuri_warnbadge, sss.USER_SHEET);
        }
        
        update_badge();
        async function update_badge()
        {
            
            var show_warnbadge = false;
            
            for (item of prefItems)
            {
                if (typeof(item) === "string")
                    continue;
                
                const current_val = getItemCurrentVal(item) ;
                if (
                    item.possibleVals.some ( function(ele) {
                        return ( ele ['val'] === current_val && ele ['warnbadge'] && ele ['warnbadge'] === true );
                    } )
                )
                {
                    show_warnbadge = true;
                    break;
                }
            }
                 
            
            if (show_warnbadge)
                add_warnbadge();
            else 
                rm_warnbadge();
        }
        
        
    })();
    Alles anzeigen
  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 16:35

    Ein Screenshot des Menüs, welches erzeugt werden soll, wäre nicht schlecht.
    Ich kann mir einfach nicht vorstellen, was das Skript macht.


    /* ***************************************************************************** */
    Hat sich erledigt!

  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 15:46
    Zitat von Endor

    Edit:
    Hat sich erledigt. Habe es selbst hinbekommen.
    Lag wohl an meiner dreckigen Brille......
    Mfg.
    Endor

    Und?
    Woran lag es?
    Übrigens ein interessantes Skript!

  • ScrollTopAndBottom.uc.js und Open with.uc.js zeigen keine Icons mehr an im Nightly

    • Mira_Belle
    • 1. August 2025 um 15:31
    Zitat von 2002Andreas

    Dann teste das bitte mal mit diesem Icon:

    chrome://global/skin/icons/arrow-down.svg

    menuitem.style.setProperty('--menuitem-icon', 'url("chrome://global/skin/icons/arrow-down.svg")');
    No problemo! Größenanpassung erfolgt!


    Zitat von FuchsFan

    Für die eigenen Icons nutze ich eine css-Datei.

    Ah!
    Das ist z.B. ein Grund, warum ich gerne alles in einem Skript habe!
    Aber ich muss zu geben, ich bin da auch nicht immer konsequent.

Unterstütze uns!

Jährlich (2025)

92,9 %

92,9% (604,17 von 650 EUR)

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