// PLUGIN_INFO//{{{ var PLUGIN_INFO = xml` {NAME} show application information hogelog 0.0.1 2.0pre 2.1 CC0 `; //}}} (function() { const appinfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); commands.add(['appinfo'], 'show application information', function(args) { if (args.length==1) { util.copyToClipboard(appinfo[args.string], true); } else { let descs = [[i,appinfo[i]] for(i in appinfo) if(i!="QueryInterface")]; let list = template.genericTable(descs, { title: ["Application Information", "Value"] }); commandline.echo(list, commandline.HL_INFOMSG); } },{ argCount: '?', completer: function(context, args) { context.title = ["Application Information", "Value"]; context.completions = [[i,appinfo[i]] for(i in appinfo) if(i!="QueryInterface")]; }, }); })(); // vim: fdm=marker sw=4 ts=4 et: