Beiträge von FuchsFan
-
-
-
-
-
Du kannst ja mal diese Version testen, ich kann nicht, bei mir stellt sich der schalter immer wieder auf true um. Muss erst mal forschen wieso.
CSS
Alles anzeigen/* // ==UserScript== // @name extras_config_menu.uc.js // @compatibility Firefox 135+ (getestet bis 155+) // @include main // @version 1.0.20260810 // @edit Eval-freie Version // ==/UserScript== */ var uProfMenu = { // === KONFIGURATION === TextOpenExe: 'C:\\Program Files\\Notepad++\\notepad++.exe', vFileManager: '', warpmenuto: 'helpMenu', sortScripts: 0, gmOrdner: 0, cssOrdner: 1, scriptFolder: 'Scripte', abouts: [ 'about:about', 'about:addons', 'about:cache', 'about:config', 'about:crashes', 'about:downloads', 'about:home', 'about:logins', 'about:memory', 'about:support', 'about:preferences', 'about:performance', 'about:profiles' ], showNormalPrefs: 1, enableScriptsToClip: 2, enableRestart: 0, // === ENDE KONFIGURATION === // === INITIALISIERUNG === init: function() { if (this.warpmenuto.toLowerCase() === 'menu') { var zielmenu = document.getElementById('menu_ToolsPopup'); if (!zielmenu) { console.error( "extras_config_menu.uc.js: Zielmenü nicht gefunden." ); return; } var menu = zielmenu.appendChild( this.createME( "menu", "Config Menü", 0, 0, "ExtraConfigMenu" ) ); menu.setAttribute("class", "menu-iconic"); menu.addEventListener("dblclick", function() { openTrustedLinkIn("about:config", "tab"); }, true); } else { if (window.__SSi === "window0") { CustomizableUI.createWidget({ id: "ExtraConfigMenu-button", defaultArea: CustomizableUI.AREA_NAVBAR, label: "Extra Config Menü", tooltiptext: "Extra Config Menü\nRechtsklick öffnet about:config" }); } var menu = document.getElementById( "ExtraConfigMenu-button" ); if (menu) { menu.setAttribute("type", "menu"); menu.addEventListener('click', function(event) { if (event.button === 2 && !this.open) { openTrustedLinkIn( "about:config", "tab" ); event.preventDefault(); } }, true); } } // CSS für Menü/Button var css = ` #ExtraConfigMenu, #ExtraConfigMenu-button { list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACnElEQVR4Xm2RzYtbZRSHn/fr3pvJzTB3qiNM2k2pMBUGhEHaqsUqdeFGQalCobgREaFu/B/cqCtxVSjoQhBEQRBmIfWDKgNGJUPt0Nhah9JJ4iSd5E6+bu5972tAO4SS5/DjXZ1znsMrNiq1eikMQqYYJCmjxNH5+zdW777L0J5KKl9VPmnf+ut9KWkwhbheuzNcOVYOmGKc5iRO0r1ykeXCx0h7kt4fC3z5wfqbQnAJwQHa5S7jAZSRuJ0mkf81cheobhBXZa+ri1uptQjHAZoZCEC1PiPgDuwxCfwerBU7b73zXn//3usCcdt4HkZ7SGZg431U51NUCgwlO3cV/bVXhR/6p9ut+nP9QYeNn7/n8qUPZxvQ/Q6VVWHk4ZqWRvlJjpx9hcGfW2wO95N2q8m3618A2WwDt/0RplSAXsBed57eyossHl5GYdHacG3zGpADM06wjQ1UUIN+CLHPvfAxojPnKLiE+bDE1R9+5GatAmgPeGCAteQ7l5GBhGSyuROyd/gFouUyWkqEErR2mwXAAA8BRS0AgMQBjSra30ZkEeDzz9Dn4ZcvMO51SMcJcTdGChmA0ABA6cAgzyG3I8jLEBylV4fWoaeIc0V7t0Uv7pFbC+CA+28mp/8+SwXKnMVmz1O9HpE+eobMZdjcoY1GIHD/NwIdoH1fBaNguzlg88pVyoUi4vTbFI8eJxsNAIfSkrliESllH/L0v0jktNNomFGv1TFrL3Fo9QSMR3jaEEXzLC09gjaKp595No0WjyCEB4zRclICUMDxtRMce/wJ1MIi2SglXShhfI/cOjxPoZRmbq4gXzt/gVrtBrdvbiG+Wf+p/mvll1BpiVAGhCDPxuAUDotz4HKHlIJON6bRbL4hhPjcMx5mkn8BBLEUrsVZbq0AAAAASUVORK5CYII="); margin-top: 0px !important; opacity: 1 !important; } #ExtraConfigMenu-button > dropmarker, #ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker { display: none !important; } `; var sss = Cc['@mozilla.org/content/style-sheet-service;1'] .getService(Ci.nsIStyleSheetService); var uri = makeURI( 'data:text/css;charset=UTF-8,' + encodeURIComponent(css) ); sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); // Menü-Popup erstellen var menuElement = document.getElementById( this.warpmenuto.toLowerCase() === 'menu' ? 'ExtraConfigMenu' : 'ExtraConfigMenu-button' ); if (!menuElement) { console.error( "extras_config_menu.uc.js: Menü-Element nicht gefunden." ); return; } menuElement.addEventListener('popupshowing', function() { uProfMenu.getScripts(0); uProfMenu.getCss(3); uProfMenu.getCss(4); uProfMenu.getCss(5); }, true); var menupopup = menuElement.appendChild( this.createME( "menupopup", 0, 0, 0, "ExtraConfigMenu-popup" ) ); // === UNTERMENÜS === var submenu = menupopup.appendChild( this.createME( "menu", "Meine Scripte", 0, 0, "submenu-ucjs" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-ucjs-items" ) ); submenu = menupopup.appendChild( this.createME( "menu", "css", 0, 0, "submenu-css" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-css-items" ) ); submenu = menupopup.appendChild( this.createME( "menu", "CSSShadow", 0, 0, "submenu-CSSShadow" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-CSSShadow-items" ) ); submenu = menupopup.appendChild( this.createME( "menu", "cssweb", 0, 0, "submenu-cssweb" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-cssweb-items" ) ); // Skriptliste in Zwischenablage if (this.enableScriptsToClip) { menupopup.appendChild( this.createME( "menuitem", "Skriptliste in Zwischenablage", function() { uProfMenu.getScripts(1); }, "uProfMenu_clipboard", 0 ) ); } menupopup.appendChild( document.createXULElement('menuseparator') ); // === KONFIGDATEIEN === var configFiles = [ { label: "Bild Url", file: "Bild Url.css", mode: 0 }, { label: "config Einträge.css", file: "config Einträge.css", mode: 0 }, { label: "userChrome.css", file: "userChrome.css", mode: 0 }, { label: "userChromeShadow.css", file: "userChromeShadow.css", mode: 0 }, { label: "userContent.css", file: "userContent.css", mode: 0 }, { label: "userChrome.js", file: "userChrome.js", mode: 0 }, { label: "prefs.js", file: "prefs.js", mode: 1 }, { label: "user.js", file: "user.js", mode: 1 } ]; configFiles.forEach(function(item) { menupopup.appendChild( uProfMenu.createME( "menuitem", item.label, function() { uProfMenu.edit(item.mode, item.file); }, "uProfMenu_edit", 0 ) ); }); menupopup.appendChild( document.createXULElement('menuseparator') ); // === ORDNER === switch (this.gmOrdner) { case 1: menupopup.appendChild( this.createME( "menuitem", "GM-skripty", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("ProfD") + uProfMenu.getDirSep() + "gm_scripts" ); }, "uProfMenu_folder", 0 ) ); break; case 2: menupopup.appendChild( this.createME( "menuitem", "USL-skripty", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("UChrm") + uProfMenu.getDirSep() + "UserScriptLoader" ); }, "uProfMenu_folder", 0 ) ); break; case 3: menupopup.appendChild( this.createME( "menuitem", "Skripty Scriptish", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("ProfD") + uProfMenu.getDirSep() + "scriptish_scripts" ); }, "uProfMenu_folder", 0 ) ); break; } menupopup.appendChild( this.createME( "menuitem", "CSS-Ordner", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("UChrm") + uProfMenu.getDirSep() + "css" ); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "CSSShadow-Ordner", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("UChrm") + uProfMenu.getDirSep() + "CSSShadow" ); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "CSSWeb-Ordner", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("UChrm") + uProfMenu.getDirSep() + "CSSWeb" ); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Chromeordner", function() { uProfMenu.prefDirOpen("UChrm"); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Profilordner", function() { uProfMenu.prefDirOpen("ProfD"); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Icons-Ordner", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("UChrm") + uProfMenu.getDirSep() + "Icons" ); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Ordner Scripte", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("UChrm") + uProfMenu.getDirSep() + uProfMenu.scriptFolder ); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Installationsordner", function() { uProfMenu.prefDirOpen("CurProcD"); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Addonordner", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("ProfD") + uProfMenu.getDirSep() + "extensions" ); }, "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Startup-Cacheordner", function() { uProfMenu.dirOpen( uProfMenu.getPrefDirectoryPath("ProfLD") + uProfMenu.getDirSep() + "startupCache" ); }, "uProfMenu_folder", 0 ) ); // === ABOUT-SEITEN === if (this.abouts.length > 0) { menupopup.appendChild( document.createXULElement('menuseparator') ); if (this.abouts[0] === '0') { for (var i = 1; i < this.abouts.length; i++) { (function(url) { menupopup.appendChild( uProfMenu.createME( "menuitem", url, function() { openTrustedLinkIn(url, "tab"); }, "uProfMenu_about", 0 ) ); })(this.abouts[i]); } } else { var submenuAbout = menupopup.appendChild( this.createME( "menu", "uc.js", 0, 0, "submenu-about" ) ); submenuAbout.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-about-items" ) ); this.fillMenu( "submenu-about", "submenu-about-items", "about:", this.abouts, "uProfMenu_about", 1 ); } } if ( this.abouts.length === 0 && ( this.showNormalPrefs || typeof ToolRstartMod !== "undefined" ) ) { menupopup.appendChild( document.createXULElement('menuseparator') ); } // Normale Einstellungen if (this.showNormalPrefs) { menupopup.appendChild( this.createME( "menuitem", "Einstellungen", function() { try { openOptionsDialog(); } catch (e) { openPreferences(); } }, "uProfMenu_prefs", 0 ) ); } // Neustart if (this.enableRestart) { menupopup.appendChild( this.createME( "menuitem", "Neustart", function() { Services.appinfo.invalidateCachesOnRestart(); Services.startup.quit( Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit, 0 ); }, 0, 0 ) ); } }, // === HILFSFUNKTIONEN === getDirSep: function() { var osString = Cc['@mozilla.org/xre/app-info;1'] .getService(Ci.nsIXULRuntime).OS; switch (osString) { case "WINNT": return "\\"; case "Linux": case "Darwin": return "/"; default: return "/"; } }, edit: function(OpenMode, Filename) { var Path = ""; var dSep = this.getDirSep(); switch (OpenMode) { case 0: Path = this.getPrefDirectoryPath("UChrm") + dSep + Filename; break; case 1: Path = this.getPrefDirectoryPath("ProfD") + dSep + Filename; break; case 2: Path = Filename; break; case 3: Path = this.getPrefDirectoryPath("UChrm") + dSep + "CSS" + dSep + Filename; break; case 4: Path = this.getPrefDirectoryPath("UChrm") + dSep + "CSSWeb" + dSep + Filename; break; case 5: Path = this.getPrefDirectoryPath("UChrm") + dSep + "CSSShadow" + dSep + Filename; break; } this.launch(this.TextOpenExe, Path); }, editPath: function(Path) { this.launch(this.TextOpenExe, Path); }, dirOpen: function(Path) { if (this.vFileManager.length !== 0) { var file = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); var process = Cc['@mozilla.org/process/util;1'] .createInstance(Ci.nsIProcess); var args = [Path]; file.initWithPath(this.vFileManager); process.init(file); process.run(false, args, args.length); } else { var dir = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); dir.initWithPath(Path); dir.launch(); } }, prefDirOpen: function(prefDir) { this.dirOpen( this.getPrefDirectoryPath(prefDir) ); }, getPrefDirectoryPath: function(str) { var file = Cc['@mozilla.org/file/directory_service;1'] .getService(Ci.nsIProperties) .get(str, Ci.nsIFile); if (str === 'CurProcD') { file = file.parent; } return file.path; }, launch: function(RanPath, OpenPath) { var editor = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); var process = Cc['@mozilla.org/process/util;1'] .createInstance(Ci.nsIProcess); try { editor.initWithPath(RanPath); if (!editor.exists() || !editor.isFile()) { var prefs = Cc['@mozilla.org/preferences-service;1'] .getService(Ci.nsIPrefBranch); if (prefs.prefHasUserValue( "view_source.editor.path" )) { RanPath = prefs.getCharPref( "view_source.editor.path" ); editor.initWithPath(RanPath); } } if (!editor.exists() || !editor.isFile()) { console.error( "extras_config_menu.uc.js: Editor nicht gefunden: " + RanPath ); return; } var target = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); target.initWithPath(OpenPath); if (!target.exists() || !target.isFile()) { console.error( "extras_config_menu.uc.js: Datei nicht gefunden: " + OpenPath ); return; } var args = [OpenPath]; process.init(editor); if (typeof process.runwAsync === "function") { process.runwAsync(args, args.length); } else if (typeof process.runw === "function") { process.runw(false, args, args.length); } else { process.run(false, args, args.length); } } catch (e) { console.error( "extras_config_menu.uc.js: Datei konnte nicht geöffnet werden", e ); } }, stringComparison: function(a, b) { a = a.toLowerCase() .replace(/ä/g, "a") .replace(/ö/g, "o") .replace(/ü/g, "u") .replace(/ß/g, "s"); b = b.toLowerCase() .replace(/ä/g, "a") .replace(/ö/g, "o") .replace(/ü/g, "u") .replace(/ß/g, "s"); return (a === b) ? 0 : (a > b) ? 1 : -1; }, getScripts: function(iType) { var scripts = []; var extjs = /\.uc\.js$/i; var dSep = this.getDirSep(); var chromePath = this.getPrefDirectoryPath("UChrm"); var readFolder = function(folderPath) { var folder = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); folder.initWithPath(folderPath); if (!folder.exists() || !folder.isDirectory()) { return; } var files = folder.directoryEntries .QueryInterface(Ci.nsISimpleEnumerator); while (files.hasMoreElements()) { var file = files.getNext() .QueryInterface(Ci.nsIFile); if (file.isFile() && extjs.test(file.leafName)) { scripts.push({ name: file.leafName, path: file.path }); } } }; // Scripts direkt aus chrome readFolder(chromePath); // Scripts aus chrome/Scripte readFolder( chromePath + dSep + this.scriptFolder ); if (this.sortScripts) { scripts.sort(function(a, b) { return uProfMenu.stringComparison( a.name, b.name ); }); } if (iType === 0) { this.fillMenu( "submenu-ucjs", "submenu-ucjs-items", "Meine Scripte", scripts, "uProfMenu_ucjs", 0 ); } else { var names = []; for (var i = 0; i < scripts.length; i++) { names.push(scripts[i].name); } var result = this.fillClipboardValue(names, []); Cc['@mozilla.org/widget/clipboardhelper;1'] .getService(Ci.nsIClipboardHelper) .copyString(result); } }, getCss: function(iType) { var cssFiles = []; var extcss = /\.css$/i; var aFolder = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); var subfolder = ""; switch (iType) { case 3: subfolder = "CSS"; break; case 4: subfolder = "CSSWeb"; break; case 5: subfolder = "CSSShadow"; break; default: return; } aFolder.initWithPath( this.getPrefDirectoryPath("UChrm") + this.getDirSep() + subfolder ); if (!aFolder.exists()) { return; } var files = aFolder.directoryEntries .QueryInterface(Ci.nsISimpleEnumerator); while (files.hasMoreElements()) { var file = files.getNext() .QueryInterface(Ci.nsIFile); if (file.isFile() && extcss.test(file.leafName)) { cssFiles.push(file.leafName); } } if (this.sortScripts) { cssFiles.sort(this.stringComparison); } var menuId; var label; switch (iType) { case 3: menuId = "submenu-css"; label = "Meine CSS-Dateien"; break; case 4: menuId = "submenu-cssweb"; label = "Meine CSSWeb-Dateien"; break; case 5: menuId = "submenu-CSSShadow"; label = "Meine CSSShadow-Dateien"; break; } this.fillMenu( menuId, menuId + "-items", label, cssFiles, "uProfMenu_css", iType ); }, fillMenu: function( whichsubmenu, whichsubmenuitems, strlabel, scriptArray, sClass, sTyp ) { var e = document.getElementById(whichsubmenu); if (e) { e.setAttribute( 'label', strlabel + ' (' + scriptArray.length + ')' ); } var popup = document.getElementById(whichsubmenuitems); if (!popup) { return; } while (popup.hasChildNodes()) { popup.removeChild(popup.firstChild); } for (var i = scriptArray.length - 1; i >= 0; i--) { var mitem; var current = scriptArray[i]; var scriptName = typeof current === "string" ? current : current.name; switch (sTyp) { case 0: if (typeof current === "string") { mitem = this.createME( "menuitem", scriptName, function() { uProfMenu.edit(0, scriptName); }, sClass, 0 ); } else { (function(script) { mitem = uProfMenu.createME( "menuitem", script.name, function() { uProfMenu.editPath(script.path); }, sClass, 0 ); })(current); } (function(script) { mitem.addEventListener('click', function(event) { if (event.button === 1) { uProfMenu.openAtGithub( event, script ); } else if (event.button === 2) { event.preventDefault(); var sUrl = "https://github.com/search?langOverride=&language=&q=" + encodeURIComponent(script) + "&repo=&start_value=1&type=Code"; openTrustedLinkIn(sUrl, 'tab'); } }, true); })(scriptName); mitem.setAttribute( "tooltiptext", "Linksklick: Bearbeiten,\n" + "Mittelklick: GitHub öffnen,\n" + "Rechtsklick: Suche auf GitHub" ); break; case 1: (function(url) { mitem = uProfMenu.createME( "menuitem", url, function() { openTrustedLinkIn(url, "tab"); }, sClass, 0 ); })(scriptName); break; case 3: case 4: case 5: (function(name, mode) { mitem = uProfMenu.createME( "menuitem", name, function() { uProfMenu.edit(mode, name); }, sClass, 0 ); })(scriptName, sTyp); break; } if (mitem) { popup.insertBefore(mitem, popup.firstChild); } } }, fillClipboardValue: function(sArray, xArray) { var s = sArray.length; var x = xArray.length; var retValue; switch (this.enableScriptsToClip) { case 1: retValue = "userChromeJS/uc.js (" + s + "):\n" + "------------------------\n" + sArray.join("\n") + "\n\nuserChromeJS/uc.xul (" + x + "):\n" + "-------------------------\n" + xArray.join("\n"); break; default: retValue = "userChromeJS/uc.js (" + s + "):\n" + "------------------------"; for (var i = 0; i < s; i++) { retValue += "\n" + (i + 1) + ". " + sArray[i]; } retValue += "\n\nuserChromeJS/uc.xul (" + x + "):\n" + "-------------------------"; if (this.enableScriptsToClip === 2) { s = 0; } for (var j = 0; j < x; j++) { retValue += "\n" + (j + s + 1) + ". " + xArray[j]; } break; } return retValue; }, createME: function(sTyp, sLabel, sCommand, sClass, sId) { const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var m = document.createElementNS(XUL_NS, sTyp); switch (sTyp) { case "menuitem": m.setAttribute('label', sLabel); if (sClass) { m.setAttribute('class', sClass); } if (sId) { m.setAttribute('id', sId); } if (typeof sCommand === "function") { m.addEventListener( 'command', sCommand ); } break; case "menu": m.setAttribute('label', sLabel); if (sId) { m.setAttribute('id', sId); } break; case "menupopup": if (sId) { m.setAttribute('id', sId); } break; } return m; }, openAtGithub: function(e, sScript) { if (e.button === 1) { var sUrl = "https://github.com/ardiman/userChrome.js/tree/master/" + this.cleanFileName(sScript); openTrustedLinkIn(sUrl, 'tab'); } }, cleanFileName: function(sName) { sName = sName.toLowerCase(); var regs = [ /\.uc\.js$/, /\.uc\.xul$/, /^ucjs_/, /_\d.+/, /_fx\d+/, /[-+\.]/g, /_v\d+/ ]; for (var i = 0; i < regs.length; i++) { sName = sName.replace(regs[i], ""); } return sName; } }; // Initialisierung uProfMenu.init(); -
-
Mira_Belle , omar1979 ,
das Script von hier habe ich mit KI überarbeitet, ist getestet bis Version 155. Das sind die Änderungen:
Desweiteren werden Scripte aus dem Ordner chrome, als auch aus dem Ordner Scripte (wenn in chrome angelegt) ausgelesen. omar1979, das solltest du dann mal probieren, denn das, was du bisher nutzt ist auf gut deutsch gesagt, Schrott.
Dann zum Test:
CSS
Alles anzeigen// ==UserScript== // @name extras_config_menu.uc.js // @compatibility Firefox 135+ (getestet bis v155) // @include main // @version 1.0.1 // ==/UserScript== var uProfMenu = { // === KONFIGURATION === // In der folgenden Zeile (13) den Pfad zum Texteditor eintragen (unter Ubuntu 10.04 z.B.: '/usr/bin/gedit'). Bei Fehleintrag wird view_source.editor.path ausgelesen: //TextOpenExe: 'C:\\notepad++\\notepad++.exe', TextOpenExe: 'C:\\Program Files\\Notepad++\\notepad++.exe', // Falls gewuenscht, in Zeile 15 einen Dateimanager eintragen (komplett leer lassen fuer Dateimanager des Systems) Beispiele: // vFileManager: 'E:\\Total Commander\\Totalcmd.exe', // vFileManager: 'C:\\Program Files (x86)\\FreeCommander\\FreeCommander.exe' vFileManager: '', // In der folgenden Zeile (22) 'menu' eintragen, damit es unter "Extras" als Menue erscheint, // sonst frei lassen, Button ist verschiebbar warpmenuto: '', // Unter Linux sollte/kann versucht werden, die userChromeJS-Skripte zu sortieren, unter Windows ist das evtl. nicht noetig (die Sortierung wird Gross- und Kleinschreibung *nicht* beruecksichtigen - dazu wird die sort()-Funktion entsprechend mit einer Vergleichsfunktion aufgerufen) sortScripts: 0, // Einbindung GM-Skripte-Ordner (0: nein, 1: Greasemonkey [Profil-Verzeichnis], 2: UserScriptLoader [Chrome-Verzeichnis], 3: Scriptish [Profil-Verzeichnis]): gmOrdner: 0, // Einbindung CSS-Ordner (0: nein, 1: UserCSSLoader-Ordner im Chrome-Verzeichnis): cssOrdner: 0, // Zusätzlicher Scriptordner innerhalb von chrome scriptFolder: 'Scripte', abouts: [ 'about:about', 'about:addons', 'about:cache', 'about:config', 'about:crashes', 'about:downloads', 'about:home', 'about:logins', 'about:memory', 'about:support', 'about:preferences', 'about:performance', 'about:profiles' ], showNormalPrefs: 1, enableScriptsToClip: 2, enableRestart: 0, // === ENDE KONFIGURATION === // === INITIALISIERUNG === init: function() { if (this.warpmenuto.toLowerCase() === 'menu') { var zielmenu = document.getElementById('menu_ToolsPopup'); if (!zielmenu) { console.error( "extras_config_menu.uc.js: Zielmenü nicht gefunden." ); return; } var menu = zielmenu.appendChild( this.createME( "menu", "Config Menü", 0, 0, "ExtraConfigMenu" ) ); menu.setAttribute("class", "menu-iconic"); menu.setAttribute( "ondblclick", "openTrustedLinkIn('about:config', 'tab');" ); } else { if (window.__SSi === "window0") { CustomizableUI.createWidget({ id: "ExtraConfigMenu-button", defaultArea: CustomizableUI.AREA_NAVBAR, label: "Extra Config Menü", tooltiptext: "Extra Config Menü\nRechtsklick öffnet about:config" }); } var menu = document.getElementById( "ExtraConfigMenu-button" ); if (menu) { menu.setAttribute("type", "menu"); menu.addEventListener('click', function(event) { if (event.button === 2 && !this.open) { openTrustedLinkIn("about:config", "tab"); event.preventDefault(); } }, true); } } // CSS für Menü/Button var css = ` #ExtraConfigMenu, #ExtraConfigMenu-button { list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACnElEQVR4Xm2RzYtbZRSHn/fr3pvJzTB3qiNM2k2pMBUGhEHaqsUqdeFGQalCobgREaFu/B/cqCtxVSjoQhBEQRBmIfWDKgNGJUPt0Nhah9JJ4iSd5E6+bu5972tAO4SS5/DjXZ1znsMrNiq1eikMQqYYJCmjxNH5+zdW777L0J5KKl9VPmnf+ut9KWkwhbheuzNcOVYOmGKc5iRO0r1ykeXCx0h7kt4fC3z5wfqbQnAJwQHa5S7jAZSRuJ0mkf81cheobhBXZa+ri1uptQjHAZoZCEC1PiPgDuwxCfwerBU7b73zXn//3usCcdt4HkZ7SGZg431U51NUCgwlO3cV/bVXhR/6p9ut+nP9QYeNn7/n8qUPZxvQ/Q6VVWHk4ZqWRvlJjpx9hcGfW2wO95N2q8m3618A2WwDt/0RplSAXsBed57eyossHl5GYdHacG3zGpADM06wjQ1UUIN+CLHPvfAxojPnKLiE+bDE1R9+5GatAmgPeGCAteQ7l5GBhGSyuROyd/gFouUyWkqEErR2mwXAAA8BRS0AgMQBjSra30ZkEeDzz9Dn4ZcvMO51SMcJcTdGChmA0ABA6cAgzyG3I8jLEBylV4fWoaeIc0V7t0Uv7pFbC+CA+28mp/8+SwXKnMVmz1O9HpE+eobMZdjcoY1GIHD/NwIdoH1fBaNguzlg88pVyoUi4vTbFI8eJxsNAIfSkrliESllH/L0v0jktNNomFGv1TFrL3Fo9QSMR3jaEEXzLC09gjaKp595No0WjyCEB4zRclICUMDxtRMce/wJ1MIi2SglXShhfI/cOjxPoZRmbq4gXzt/gVrtBrdvbiG+Wf+p/mvll1BpiVAGhCDPxuAUDotz4HKHlIJON6bRbL4hhPjcMx5mkn8BBLEUrsVZbq0AAAAASUVORK5CYII="); margin-top: 0px !important; opacity: 1 !important; } #ExtraConfigMenu-button > dropmarker, #ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker { display: none !important; } `; var sss = Cc['@mozilla.org/content/style-sheet-service;1'] .getService(Ci.nsIStyleSheetService); var uri = makeURI( 'data:text/css;charset=UTF-8,' + encodeURIComponent(css) ); sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); // Menü-Popup erstellen var menuElement = document.getElementById( this.warpmenuto.toLowerCase() === 'menu' ? 'ExtraConfigMenu' : 'ExtraConfigMenu-button' ); if (!menuElement) { console.error( "extras_config_menu.uc.js: Menü-Element nicht gefunden." ); return; } menuElement.addEventListener('popupshowing', function() { uProfMenu.getScripts(0); uProfMenu.getCss(3); uProfMenu.getCss(4); uProfMenu.getCss(5); }, true); var menupopup = menuElement.appendChild( this.createME( "menupopup", 0, 0, 0, "ExtraConfigMenu-popup" ) ); // === UNTERMENÜS === var submenu = menupopup.appendChild( this.createME( "menu", "Meine Scripte", 0, 0, "submenu-ucjs" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-ucjs-items" ) ); submenu = menupopup.appendChild( this.createME( "menu", "css", 0, 0, "submenu-css" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-css-items" ) ); submenu = menupopup.appendChild( this.createME( "menu", "CSSShadow", 0, 0, "submenu-CSSShadow" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-CSSShadow-items" ) ); submenu = menupopup.appendChild( this.createME( "menu", "cssweb", 0, 0, "submenu-cssweb" ) ); submenu.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-cssweb-items" ) ); if (this.enableScriptsToClip) { menupopup.appendChild( this.createME( "menuitem", "Skriptliste in Zwischenablage", "uProfMenu.getScripts(1)", "uProfMenu_clipboard", 0 ) ); } menupopup.appendChild( document.createXULElement('menuseparator') ); // === KONFIGDATEIEN === var configFiles = [ { label: "Bild Url", file: "Bild Url.css", mode: 0 }, { label: "config Einträge.css", file: "config Einträge.css", mode: 0 }, { label: "userChrome.css", file: "userChrome.css", mode: 0 }, { label: "userChromeShadow.css", file: "userChromeShadow.css", mode: 0 }, { label: "userContent.css", file: "userContent.css", mode: 0 }, { label: "userChrome.js", file: "userChrome.js", mode: 0 }, { label: "prefs.js", file: "prefs.js", mode: 1 }, { label: "user.js", file: "user.js", mode: 1 } ]; configFiles.forEach(function(item) { menupopup.appendChild( uProfMenu.createME( "menuitem", item.label, "uProfMenu.edit(" + item.mode + ",'" + item.file + "')", "uProfMenu_edit", 0 ) ); }); menupopup.appendChild( document.createXULElement('menuseparator') ); // === ORDNER === switch (this.gmOrdner) { case 1: menupopup.appendChild( this.createME( "menuitem", "GM-skripty", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'gm_scripts')", "uProfMenu_folder", 0 ) ); break; case 2: menupopup.appendChild( this.createME( "menuitem", "USL-skripty", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'UserScriptLoader')", "uProfMenu_folder", 0 ) ); break; case 3: menupopup.appendChild( this.createME( "menuitem", "Skripty Scriptish", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'scriptish_scripts')", "uProfMenu_folder", 0 ) ); break; } menupopup.appendChild( this.createME( "menuitem", "CSS-Ordner", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'css')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "CSSShadow-Ordner", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'CSSShadow')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "CSSWeb-Ordner", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'CSSWeb')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Chromeordner", "uProfMenu.prefDirOpen('UChrm')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Profilordner", "uProfMenu.prefDirOpen('ProfD')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Icons-Ordner", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'Icons')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Ordner Scripte", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+uProfMenu.scriptFolder)", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Installationsordner", "uProfMenu.prefDirOpen('CurProcD')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Addonordner", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'extensions')", "uProfMenu_folder", 0 ) ); menupopup.appendChild( this.createME( "menuitem", "Startup-Cacheordner", "uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfLD')+uProfMenu.getDirSep()+'startupCache')", "uProfMenu_folder", 0 ) ); // === ABOUT-SEITEN === if (this.abouts.length > 0) { menupopup.appendChild( document.createXULElement('menuseparator') ); if (this.abouts[0] === '0') { for (var i = 1; i < this.abouts.length; i++) { menupopup.appendChild( this.createME( "menuitem", this.abouts[i], "openTrustedLinkIn('" + this.abouts[i] + "','tab')", "uProfMenu_about", 0 ) ); } } else { var submenuAbout = menupopup.appendChild( this.createME( "menu", "uc.js", 0, 0, "submenu-about" ) ); submenuAbout.appendChild( this.createME( "menupopup", 0, 0, 0, "submenu-about-items" ) ); this.fillMenu( "submenu-about", "submenu-about-items", "about:", this.abouts, "uProfMenu_about", 1 ); } } if ( this.abouts.length === 0 && ( this.showNormalPrefs || typeof ToolRstartMod !== "undefined" ) ) { menupopup.appendChild( document.createXULElement('menuseparator') ); } if (this.showNormalPrefs) { menupopup.appendChild( this.createME( "menuitem", "Einstellungen", "try{openOptionsDialog();}catch(e){openPreferences();}", "uProfMenu_prefs", 0 ) ); } if (this.enableRestart) { menupopup.appendChild( this.createME( "menuitem", "Neustart", "Services.appinfo.invalidateCachesOnRestart(); Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit, 0);", 0, 0 ) ); } }, // === HILFSFUNKTIONEN === getDirSep: function() { var osString = Cc['@mozilla.org/xre/app-info;1'] .getService(Ci.nsIXULRuntime).OS; switch (osString) { case "WINNT": return "\\"; case "Linux": case "Darwin": return "/"; default: return "/"; } }, edit: function(OpenMode, Filename) { var Path = ""; var dSep = this.getDirSep(); switch (OpenMode) { // Dateien direkt im chrome-Ordner case 0: Path = this.getPrefDirectoryPath("UChrm") + dSep + Filename; break; // Dateien direkt im Profilordner case 1: Path = this.getPrefDirectoryPath("ProfD") + dSep + Filename; break; // Vollständiger Pfad case 2: Path = Filename; break; // CSS-Ordner case 3: Path = this.getPrefDirectoryPath("UChrm") + dSep + "CSS" + dSep + Filename; break; // CSSWeb-Ordner case 4: Path = this.getPrefDirectoryPath("UChrm") + dSep + "CSSWeb" + dSep + Filename; break; // CSSShadow-Ordner case 5: Path = this.getPrefDirectoryPath("UChrm") + dSep + "CSSShadow" + dSep + Filename; break; } this.launch(this.TextOpenExe, Path); }, // Öffnet einen vollständigen Dateipfad editPath: function(Path) { this.launch(this.TextOpenExe, Path); }, dirOpen: function(Path) { if (this.vFileManager.length !== 0) { var file = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); var process = Cc['@mozilla.org/process/util;1'] .createInstance(Ci.nsIProcess); var args = [Path]; file.initWithPath(this.vFileManager); process.init(file); process.run(false, args, args.length); } else { var dir = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); dir.initWithPath(Path); dir.launch(); } }, prefDirOpen: function(prefDir) { var Path = this.getPrefDirectoryPath(prefDir); this.dirOpen(Path); }, getPrefDirectoryPath: function(str) { var file = Cc['@mozilla.org/file/directory_service;1'] .getService(Ci.nsIProperties) .get(str, Ci.nsIFile); if (str === 'CurProcD') { file = file.parent; } return file.path; }, launch: function(RanPath, OpenPath) { var editor = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); var process = Cc['@mozilla.org/process/util;1'] .createInstance(Ci.nsIProcess); try { editor.initWithPath(RanPath); if (!editor.exists() || !editor.isFile()) { var prefs = Cc['@mozilla.org/preferences-service;1'] .getService(Ci.nsIPrefBranch); if (prefs.prefHasUserValue( "view_source.editor.path" )) { RanPath = prefs.getCharPref( "view_source.editor.path" ); editor.initWithPath(RanPath); } } if (!editor.exists() || !editor.isFile()) { console.error( "extras_config_menu.uc.js: Editor nicht gefunden: " + RanPath ); return; } var target = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); target.initWithPath(OpenPath); if (!target.exists() || !target.isFile()) { console.error( "extras_config_menu.uc.js: Datei nicht gefunden: " + OpenPath ); return; } var args = [OpenPath]; process.init(editor); if (typeof process.runwAsync === "function") { process.runwAsync(args, args.length); } else if (typeof process.runw === "function") { process.runw(false, args, args.length); } else { process.run(false, args, args.length); } } catch (e) { console.error( "extras_config_menu.uc.js: Datei konnte nicht geöffnet werden", e ); } }, stringComparison: function(a, b) { a = a.toLowerCase() .replace(/ä/g, "a") .replace(/ö/g, "o") .replace(/ü/g, "u") .replace(/ß/g, "s"); b = b.toLowerCase() .replace(/ä/g, "a") .replace(/ö/g, "o") .replace(/ü/g, "u") .replace(/ß/g, "s"); return (a === b) ? 0 : (a > b) ? 1 : -1; }, getScripts: function(iType) { var scripts = []; var extjs = /\.uc\.js$/i; var dSep = this.getDirSep(); var chromePath = this.getPrefDirectoryPath("UChrm"); var readFolder = function(folderPath) { var folder = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); folder.initWithPath(folderPath); if (!folder.exists() || !folder.isDirectory()) { return; } var files = folder.directoryEntries .QueryInterface(Ci.nsISimpleEnumerator); while (files.hasMoreElements()) { var file = files.getNext() .QueryInterface(Ci.nsIFile); if (file.isFile() && extjs.test(file.leafName)) { scripts.push({ name: file.leafName, path: file.path }); } } }; // Scripts direkt aus chrome lesen readFolder(chromePath); // Scripts aus chrome/Scripte lesen readFolder( chromePath + dSep + this.scriptFolder ); if (this.sortScripts) { scripts.sort(function(a, b) { return uProfMenu.stringComparison( a.name, b.name ); }); } if (iType === 0) { this.fillMenu( "submenu-ucjs", "submenu-ucjs-items", "Meine Scripte", scripts, "uProfMenu_ucjs", 0 ); } else { var names = []; for (var i = 0; i < scripts.length; i++) { names.push(scripts[i].name); } var result = this.fillClipboardValue(names, []); Cc['@mozilla.org/widget/clipboardhelper;1'] .getService(Ci.nsIClipboardHelper) .copyString(result); } }, getCss: function(iType) { var cssFiles = []; var extcss = /\.css$/i; var aFolder = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsIFile); var subfolder = ""; switch (iType) { case 3: subfolder = "CSS"; break; case 4: subfolder = "CSSWeb"; break; case 5: subfolder = "CSSShadow"; break; default: return; } aFolder.initWithPath( this.getPrefDirectoryPath("UChrm") + this.getDirSep() + subfolder ); if (!aFolder.exists()) { return; } var files = aFolder.directoryEntries .QueryInterface(Ci.nsISimpleEnumerator); while (files.hasMoreElements()) { var file = files.getNext() .QueryInterface(Ci.nsIFile); if (file.isFile() && extcss.test(file.leafName)) { cssFiles.push(file.leafName); } } if (this.sortScripts) { cssFiles.sort(this.stringComparison); } var menuId; var label; switch (iType) { case 3: menuId = "submenu-css"; label = "Meine CSS-Dateien"; break; case 4: menuId = "submenu-cssweb"; label = "Meine CSSWeb-Dateien"; break; case 5: menuId = "submenu-CSSShadow"; label = "Meine CSSShadow-Dateien"; break; } this.fillMenu( menuId, menuId + "-items", label, cssFiles, "uProfMenu_css", iType ); }, fillMenu: function( whichsubmenu, whichsubmenuitems, strlabel, scriptArray, sClass, sTyp ) { var e = document.getElementById(whichsubmenu); if (e) { e.setAttribute( 'label', strlabel + ' (' + scriptArray.length + ')' ); } var popup = document.getElementById( whichsubmenuitems ); if (!popup) { return; } while (popup.hasChildNodes()) { popup.removeChild(popup.firstChild); } for (var i = scriptArray.length - 1; i >= 0; i--) { var mitem; var current = scriptArray[i]; var scriptName = typeof current === "string" ? current : current.name; switch (sTyp) { case 0: if (typeof current === "string") { mitem = this.createME( "menuitem", scriptName, "uProfMenu.edit(0,'" + scriptName + "')", sClass, 0 ); } else { mitem = this.createME( "menuitem", scriptName, "uProfMenu.editPath(" + JSON.stringify(current.path) + ")", sClass, 0 ); } (function(script) { mitem.addEventListener( 'click', function(event) { if (event.button === 1) { uProfMenu.openAtGithub( event, script ); } else if (event.button === 2) { event.preventDefault(); var sUrl = "https://github.com/search?langOverride=&language=&q=" + encodeURIComponent(script) + "&repo=&start_value=1&type=Code"; openTrustedLinkIn( sUrl, 'tab' ); } }, true ); })(scriptName); mitem.setAttribute( "tooltiptext", "Linksklick: Bearbeiten,\n" + "Mittelklick: GitHub öffnen,\n" + "Rechtsklick: Suche auf GitHub" ); break; case 1: mitem = this.createME( "menuitem", scriptName, "openTrustedLinkIn('" + scriptName + "','tab')", sClass, 0 ); break; case 3: case 4: case 5: mitem = this.createME( "menuitem", scriptName, "uProfMenu.edit(" + sTyp + ",'" + scriptName + "')", sClass, 0 ); break; } if (mitem) { popup.insertBefore( mitem, popup.firstChild ); } } }, fillClipboardValue: function(sArray, xArray) { var s = sArray.length; var x = xArray.length; var retValue; switch (this.enableScriptsToClip) { case 1: retValue = "userChromeJS/uc.js (" + s + "):\n" + "------------------------\n" + sArray.join("\n") + "\n\nuserChromeJS/uc.xul (" + x + "):\n" + "-------------------------\n" + xArray.join("\n"); break; default: retValue = "userChromeJS/uc.js (" + s + "):\n" + "------------------------"; for (var i = 0; i < s; i++) { retValue += "\n" + (i + 1) + ". " + sArray[i]; } retValue += "\n\nuserChromeJS/uc.xul (" + x + "):\n" + "-------------------------"; if (this.enableScriptsToClip === 2) { s = 0; } for (var j = 0; j < x; j++) { retValue += "\n" + (j + s + 1) + ". " + xArray[j]; } break; } return retValue; }, createME: function(sTyp, sLabel, sCommand, sClass, sId) { const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var m = document.createElementNS( XUL_NS, sTyp ); switch (sTyp) { case "menuitem": m.setAttribute( 'label', sLabel ); if (sClass) { m.setAttribute( 'class', sClass ); } if (sId) { m.setAttribute( 'id', sId ); } if (sCommand) { m.addEventListener( 'command', function() { new Function(sCommand)(); } ); } break; case "menu": m.setAttribute( 'label', sLabel ); if (sId) { m.setAttribute( 'id', sId ); } break; case "menupopup": if (sId) { m.setAttribute( 'id', sId ); } break; } return m; }, openAtGithub: function(e, sScript) { if (e.button === 1) { var sUrl = "https://github.com/ardiman/userChrome.js/tree/master/" + this.cleanFileName(sScript); openTrustedLinkIn( sUrl, 'tab' ); } }, cleanFileName: function(sName) { sName = sName.toLowerCase(); var regs = [ /\.uc\.js$/, /\.uc\.xul$/, /^ucjs_/, /_\d.+/, /_fx\d+/, /[-+\.]/g, /_v\d+/ ]; for (var i = 0; i < regs.length; i++) { sName = sName.replace( regs[i], "" ); } return sName; } }; // Initialisierung uProfMenu.init(); -
-
Herzlichen Dank, das hast du super gemacht
. Muss ich noch etwas anpassen, aber es macht was es soll. 

-
Das komplette CSS, oder Script, dazu bitte posten
1059 Zeilen Code, nicht eine davon hat mit dem Problem etwas zu tun, begreife es jetzt bitte. Und nicht umsonst habe ich hier um Hilfe gebeten, weil ich nichts dazu finden konnte. Und wenn 2002Andreas , grisu2099 und Dharkness das genau so sehen, warum willst du das nicht verstehen. Gesagt hatte ich, es bleibt so wie es ist i.M.
-
oder vorhandenes CSS rechts unten roter Pfeil eine andere Farbe?
Nicht rechts unten, siehe Beitrag #1.
-
Die Bilder vom Kunden sind zu wenig aussagend, man sieht nicht das ganze, zumal da schon mit CSS rumfuhrwerkt wurde und kein Original zu sehen ist. Bilder also bitte mit mehr Zusammenhang anbieten!
Du fährst hier aber Geschütze auf, rumfuhrwerkt.
Ist nicht mein lieber Kritiker, alles wohl durchdacht. Für dich also noch einmal ganz konkret, mir geht es nur darum den Text (Label) zentriert in das Feld einzupassen, und eventuell eine andere Farbe (siehe Beitrag #5). Und weil du das erste Bild nicht deuten konntest, hier die Auflösung.
Mit diesen ↓ CSS-Schnipseln könntest Du beide unterschiedlich gestalten, oder eben nur eines, entweder Erweiterungen oder Themes.
Danke, Ralf, ich gebe erst einmal auf. Das ist wirklich eine verzwickte Sache, was Mozilla neuerdings gebaut hat.
-
Wie man das nur in der Rubrik Erweiterungen ansprechen kann, da muss ich leider passen
Danke für deine Bemühungen.
Den Code verwende ich für die Meldungen bisher, nur diese eine macht Schwierigkeiten.
CSS
Alles anzeigen/* die Meldungen bei Update-Suche */ #updates-message[state="updating"], #updates-message[state="none-found"], #updates-message[state="installed"] { min-width: 255px !important; max-width: 255px !important; margin-inline-end: 1px !important; background: lightblue !important; color: blue !important; } #updates-message[state="manual-updates-found"] { min-width: 265px !important; max-width: 265px !important; margin-inline-end: 1px !important; background: lightblue !important; color: blue !important; } addon-page-header#page-header[current-view="detail"] #updates-message[state="updating"], addon-page-header#page-header[current-view="detail"] #updates-message[state="none-found"], addon-page-header#page-header[current-view="detail"] #updates-message[state="manual-updates-found"], addon-page-header#page-header[current-view="detail"] #updates-message[state="installed"] { margin-left: 154px !important; } #updates-message[state="none-found"][data-l10n-id="addon-updates-none-found"] { color: #409DD9 !important; } [data-l10n-id="addon-updates-updating"], [data-l10n-id="addon-updates-none-found"], [data-l10n-id="addon-updates-installed"] { padding: 0 !important; margin: 0 auto !important; } [data-l10n-id="addon-updates-manual-updates-found"] { width: calc(100% + 10px) !important; min-height: 26px !important; max-height: 26px !important; padding: 0 !important; margin: 0 !important; } -
So sieht es mit der Meldung korrekt aus.

Wie lautet das denn für Themes und Erweiterungen ?
für Themes:
[data-l10n-id="addon-category-theme-title"] {für Erweiterungen:
[data-l10n-id="addon-category-extension-title"] {Den Rest kannst du dir dann nach dem Muster anpassen.
-
Meinst du den hier?
Daneben, Andreas, sei gegrüßt.

Das hatte ich vor, wenn ich manuell Updates suche.
-
-
Sieht hier dann so aus:
Stimmt!
-
-
das funktioniert hier mit einer kleinen Änderung so, wie ich es haben möchte
Prima, dann passt es.

-
Ich nutze das folgende Script, wenn du dort die Zeilen 174 bis 183 auskommentierst, dann hast du das Ergebnis:
JavaScript
Alles anzeigen// basiert auf Sript von BrokenHeart // Firefox 154+ (function() { if (!window.gBrowser) return; setTimeout(function() { setFunction(); }, 50); // Custom icons in profile/chrome/icons folder let ProfilePath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); let icon1 = "Ordner.png"; let icon2 = "Bild36.png"; let cs_font_size = 12; let cs_font_weight = 700; let cs_font_color = "blue"; // Fix: feste Spaltenbreite (anpassen, wenn du mehrstellig erwartest) let colWidthCh = 4; function setFunction() { const css = ` #bmContent { font-family: "Courier New", monospace !important; font-size: ${cs_font_size}px !important; font-weight: ${cs_font_weight} !important; display: flex !important; align-items: center !important; justify-content: flex-end !important; /* nach rechts drücken innerhalb von menu-text */ margin-left: auto !important; height: 16px !important; white-space: nowrap !important; margin-top: -14px !important; } .bmIcon1 { width: 16px; height: 16px; background: url("${ProfilePath}/${icon1}") no-repeat center; background-size: 16px 16px; /* Icon kommt NACH dem Wert => Abstand links ist das relevante */ margin-left: 6px; margin-right: 0; margin-top: -2px; flex: 0 0 auto; } .bmIcon2 { width: 16px; height: 16px; background: url("${ProfilePath}/${icon2}") no-repeat center; background-size: 12px 12px; margin-left: 6px; margin-right: 0; margin-top: -2px; flex: 0 0 auto; } .bmValue { color: ${cs_font_color} !important; flex: 0 0 auto; min-width: ${colWidthCh}ch; /* gleiche Flucht über Zeilen */ text-align: right; } .bmSlash { color: ${cs_font_color} !important; margin-left: 3px !important; margin-right: -7px !important; } /* Hover-Farbwechsel */ menupopup[placespopup="true"] > menu.bookmark-item:hover > .menu-text > #bmContent .bmValue { color: red !important; fill: red !important; } menupopup[placespopup="true"] > menu.bookmark-item:hover > .menu-text > #bmContent .bmSlash { color: #000 !important; fill: #000 !important; } `; const sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); const uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css)); sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); let bookMenu = document.getElementById('bookmarksMenu'); let persToolBar = document.getElementById('PersonalToolbar'); if (bookMenu) { bookMenu.addEventListener('popupshown', onPopupShowing); } if (persToolBar) { persToolBar.addEventListener('popupshowing', onPopupShowing); } } function onPopupShowing(aEvent) { let popup = aEvent.originalTarget; for (let item of popup.children) { if (item.localName != 'menu' || item.id?.startsWith('history')) continue; setTimeout(() => { let itemPopup = item.menupopup; itemPopup.hidden = true; itemPopup.collapsed = true; itemPopup.openPopup(); itemPopup.hidePopup(); let menuitemCount = 0; let menuCount = 0; for (let subitem of itemPopup.children) { if (subitem.classList.contains('bookmark-item') && !subitem.disabled && !subitem.hidden) { if (subitem.localName == 'menuitem') { menuitemCount++; } else if (subitem.localName == 'menu') { menuCount++; } } } itemPopup.hidden = false; itemPopup.collapsed = false; let bmCounta = item.childNodes[1]; bmCounta.innerHTML = ""; let bmContent = document.createElement("bmContent"); bmContent.id = "bmContent"; let strCountOut1 = menuCount; // Ordner let strCountOut2 = menuitemCount; // Lesezeichen // DOM: value1 + Icon1 + "/" + value2 + Icon2 let v1 = document.createElement("span"); v1.className = "bmValue"; v1.textContent = strCountOut1; let icon1El = document.createElement("span"); icon1El.className = "bmIcon1"; let slash = document.createElement("span"); slash.className = "bmSlash"; slash.textContent = "/"; // ohne Leerzeichen let v2 = document.createElement("span"); v2.className = "bmValue"; v2.textContent = strCountOut2; let icon2El = document.createElement("span"); icon2El.className = "bmIcon2"; // Ausblenden-Logik: Wenn ein Zähler 0 ist, alles rechts davon konsequent ausblenden if (strCountOut1 === 0) { v1.style.display = "none"; icon1El.style.display = "none"; slash.style.display = "none"; } if (strCountOut2 === 0) { v2.style.display = "none"; icon2El.style.display = "none"; slash.style.display = "none"; } bmContent.appendChild(v1); bmContent.appendChild(icon1El); bmContent.appendChild(slash); bmContent.appendChild(v2); bmContent.appendChild(icon2El); bmCounta.appendChild(bmContent); }, 100); } } })();