für einen Button zum chrome-Ordner?
Wenn dir der reicht
JavaScript
// Chrome Ordner
(function() {
if (location != AppConstants.BROWSER_CHROME_URL) return;
try {
CustomizableUI.createWidget({
id: 'Open-Chromefolder-button',
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: 'Open-Chromefolder-button',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
removable: true,
label: 'Chrome Ordner Öffnen',
tooltiptext: 'Chrome Ordner',
style: 'list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAM1JREFUOI3tj80KAWEYhc/7fZNSalJCUsSOjfKzsXcf9q6B5iq4BnuyshHlCoSVkiQ1RX7SzPtaKTWosbLwbE/n6RwCgFxrUGFQBk+IwmnOkx4si/EBylv9MjNNQYo8qfAYWtdnzdryncBwWWfTpqZIUL3KqwAWxfbQE9gXd726UMlIRc1GIhyCwDvgEzFTks7+2KVyZyF+yw8IDPVtGQAECi+P++Ev+AmBQL5vi8C42butDobi8C0iOOfDxhC+Fq72saqgfN1hMDsBGd0BybdFDCX6fDQAAAAASUVORK5CYII=)',
oncommand: "Services.dirsvc.get('UChrm', Ci.nsIFile).launch();"
};
for (var p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
CustomizableUI.registerToolbarNode(tb);
} catch(e) { };
}) ();
Alles anzeigen