- Firefox-Version
- Firefox 149.0
- Betriebssystem
- Windows 11 Pro 64 Bit
Hallo zusammen,
JavaScript
// Button_Verzeichnisse.uc.js
// Linksklick öffnet Profilordner
// Mittelklick öffnet Installationsordner
// Rechtsklick öffnet Ordner chrome
(function() {
if (!window.gBrowser)
return;
try {
CustomizableUI.createWidget({
id: 'buttonOrdner',
type: 'custom',
defaultArea: CustomizableUI.AREAS,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var props = {
id: 'buttonOrdner',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
removable: true,
// Name im AnpassungFenster
label: 'Ordner aufrufen',
// Name bei MausHover wenn in Symbolleiste
tooltiptext: 'Links Profilordner / Mitte Installationsordner / Rechts Ordner chrome',
// style: 'list-style-image: url("file:///C:/FoxIcons2/ordner2.png")',
style: 'list-style-image: url("file:///H:/Profile/Firefox/Fx57-H-Default/chrome/icons/folder_go.png")',
};
for (var p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('buttonOrdner').addEventListener('click', event => {
if (event.button == 0) {
uProfMenu.prefDirOpen('ProfD');
}
if (event.button == 1) {
uProfMenu.prefDirOpen('CurProcD');
}
if (event.button == 2) {
Services.dirsvc.get("UChrm", Ci.nsIFile).launch();
}
});
})();
Alles anzeigen
auch das ↑ Script funktioniert hier nicht, es hat folgende Funktionen, Linksklick öffnet Profilordner, Mittelklick öffnet Installationsordner und Rechtsklick öffnet Ordner chrome.