Das Skript funktioniert auch ohne
Ich weiß, aber mit könnte es evtl. Probleme bei anderen Systemen geben...MAC...Linux...
Das Skript funktioniert auch ohne
Ich weiß, aber mit könnte es evtl. Probleme bei anderen Systemen geben...MAC...Linux...
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.
/* 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
UND visibility: hidden; getestet, funzt nicht!
Ok, alle komischen "Kästchen" sind weg!
Lösung ist zwar nicht besonders schön, aber funktioniert.
Das dauert hier wohl noch ein Weilchen.
UND visibility: hidden; getestet, funzt nicht!
Wo soll etwas unsichtbar werden?
Meinst du hier das badge?
Hast du es mal mit dem Zusatz: !important getestet?
Ich denke, Du bist besser beraten, einzelne Skripte zu nutzen.
Z.B. eines für ein abgespecktes Appmenü
Stellst du mir bitte mal dein "abgespecktes" Appmenü zur Verfügung, welches jetzt auch im Nightly ohne Fehler funktioniert. Ich möchte damit einige Tests ausführen.
Wo soll etwas unsichtbar werden?
Meinst du hier das badge?
Na dann schau Dir noch einmal Dein Sceenshot an.
// ==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:
Ich hänge mich mal an (eine andere Art der Einbindung von --menuitem-icon in Zeile 59):
Beispiel:
// JavaScript Document
// M_Quit_Firefox.uc.js
// FF 143
// Quelle: https://www...
// Das Script erstellt einen neuen Menüeintrag, der ein einzelnes Firefox-Fenster separat schließt (Linksklick) oder Firefox beendet (Mittel-/Rechtsklick). Das .svg-Icon kann - je nach Hover-Zustand - mit zwei unterschiedlichen Farben gefüllt werden [fill]. Beim Überfahren des Menuitems rotiert das Icon um 180deg [rotate: 180deg].
// Das Menü für den Menüeintrag kann selektiert werden (Seitenkontextmenü oder Tabkontextmenü).
// Die Position des Menüeintrags innerhalb des Menüs kann bestimmt werden.
// Eine Darstellung des Menüeintrags mit/ohne Icon kann gewählt werden.
// Für das mitgelieferte Icon als .svg-Datei mit [moz-context-properties] ändert das Script - bei gewählter Iconanzeige [const isIcon = 1;] - die Einstellung [svg.context-properties.content.enabled] in about:config auf 'true'.
(function() {
if (!window.gBrowser)
return;
const
// ■■ START UserConfiguration ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
id = 'contextQuit', // ID des neuen menuitems
label = 'Fenster schließen/Firefox beenden', // Bezeichnung des neuen menuitems
tooltiptext = 'Fenster schließen/Firefox beenden\n\nLinksklick: Fenster schließen\nMittel-/Rechtsklick: Firefox beenden',
// Icon-------------------------------------------------------
isIcon = 1,
// isIcon = 1, mit Icon
// isIcon = 0, ohne Icon; die Konstanten icon, iconPath, iconColOu und iconColOv haben dann keine Funktion und sollten unberührt bleiben
icon = 'quit-16.svg', // [Name.Dateiendung] des Symbols
iconPath = '/chrome/icons/', // Pfad zum Ordner der das Icon beinhaltet
iconColOu = 'firebrick', // Farbe des Icons (nur .svg-Datei mit [moz-context-properties], bei anderen Icons hat const iconColOu keine Funktion)
iconColOv = 'currentColor', // Farbe des Icons beim Überfahren des Items (nur .svg-Datei mit [moz-context-properties], bei anderen Icons hat const iconColOv keine Funktion)
// Menü-------------------------------------------------------
isMenu = 2,
// isMenu = 1, für Seitenkontextmenü;
// isMenu = 2, für Tabkontextmenü';
isPos = 12,
// Option A:
// isPos = 12, [Zahlen von -5 bis 20]
// Menuitem an einer bestimmten Position im Menü einfügen
// wie in CSS: [order:12!important;]
// Option B:
// isPos = 'context-inspect'; [String]
// Menuitem auf diesen Menüpunkt folgend einfügen
// wie in CSS: [#context-inspect]
// ■■ END UserConfiguration ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
curProfDir = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir)),
cl = '.menu-icon',
menu1 = document.getElementById('contentAreaContextMenu'),
menu2 = document.getElementById('tabContextMenu'),
menuitem = document.createXULElement('menuitem');
//const end
menuitem.id = id;
menuitem.setAttribute('label', label);
menuitem.setAttribute('tooltiptext', tooltiptext);
//mit Icon
if (isIcon === 1) {
//----
if (Services.prefs.getBoolPref('svg.context-properties.content.enabled') == false) {
Services.prefs.setBoolPref('svg.context-properties.content.enabled', true );
}
//----
menuitem.classList.add('menuitem-iconic');
menuitem.setAttribute('style','--menuitem-icon: url("' + curProfDir + iconPath + icon + '")');
menuitem.style.MozContextProperties = 'fill, stroke, fill-opacity';
//Icon start
switch (isMenu) {
case 1:
menu1.addEventListener('popupshowing', () => {
menuitem.querySelector(cl).style.fill = iconColOu;
});
break;
case 2:
menu2.addEventListener('popupshowing', () => {
menuitem.querySelector(cl).style.fill = iconColOu;
});
break;
}
//Icon over
menuitem.addEventListener('mouseover', () => {
menuitem.querySelector(cl).setAttribute('style','fill:'+iconColOv+';rotate: 180deg; transition: rotate 0.2s ease-in-out 0.1s;');
});
//Icon out
menuitem.addEventListener('mouseout', () => {
menuitem.querySelector(cl).setAttribute('style','fill:'+iconColOu+';rotate: 0deg; transition: rotate 0.2s ease-in-out 0.1s;');
});
}
//Icon end
//click
menuitem.addEventListener('click', () => {
if (event.button === 0) {
event.target.ownerGlobal.BrowserCommands.tryToCloseWindow(event);
}
else
if (event.button === 1 || event.button === 2) {
event.target.ownerGlobal.goQuitApplication(event);
}
});
//Position order
if (isPos > -6 && isPos < 21) {
if (isMenu === 1) {
menu1.append(menuitem);
}
else
if (isMenu === 2) {
menu2.append(menuitem);
}
menuitem.style.order = isPos;
}
//Position reference
else {
const refItem = document.getElementById(isPos);
refItem.parentNode.insertBefore(menuitem, refItem.nextSibling);
}
//----
})();
Alles anzeigen
eine andere Art der Einbindung von --menuitem-icon in Zeile 59
Aber wieso? Das ist doch komplett inkonsistent zum restlichen Code ist. Direkt eine Zeile darunter greifst du ja auch auf die style-Eigenschaft zu. Und eine Zeile darüber auf die classList-Eigenschaft. Da verwendest du ja auch nicht setAttribute('class', '…'). Zumal du dir damit auch Flexibilität nimmst. Du kannst beliebig viele Zeilen schreiben, in denen du auf die style-Eigenschaft zugreifst. Aber setAttribute('style', '…') kannst du genau ein einziges Mal verwenden, sonst überschreibst du dir alles wieder. Und übersichtlicher ist die Verwendung von setProperty für Variablen auch, da Variablen-Name und -Wert damit getrennt voneinander sind. Also ich sehe keinen Vorteil in dieser anderen Art.
Das ist doch komplett inkonsistent zum restlichen Code
Darüber muss ich erst mal nachdenken...
für Tests setze ganz einfach "interne" Symbole
oder schaue hier:
Ich danke dir, werde mich damit befassen.
Nachtrag:
Eventuell kann es Verwendung finden, mit dem folgenden Code sind die Kästchen hinter den Icons ausgeblendet. Script Appmenu.uc.js funktioniert fehlerfrei.
/*=== ab Version 143 ===*/
/* die Kästchen hinter den Icons ausgeblendet */
#AppMenuButton menupopup#AMpopup menuitem.menuitem-iconic img.menu-icon {
display: none !important;
}
/* die Kästchen hinter den Icons bei Submenüs ausgeblendet */
#AppMenuButton menupopup#AMpopup menu.menu-iconic img.menu-icon {
display: none !important;
}
/* Text in den Menüs nach rechts verlagert */
#AMpopup menuitem.menuitem-iconic label.menu-text {
padding-left: 22px !important;
}
/* Text in den Menüs mit Submenüs nach rechts verlagert */
#AppMenuButton menupopup#AMpopup menu.menu-iconic label.menu-text {
padding-left: 23px !important;
}
#AMpopup menuitem.menuitem-iconic:hover label.menu-text {
font-weight: 700 !important;
color: red !important;
}
/** ENDE */
Alles anzeigen