From 2df79473f91f1b795298205458fcc3bbbd8b6795 Mon Sep 17 00:00:00 2001 From: hogelog Date: Sun, 28 Jun 2009 12:49:48 +0000 Subject: * firefox/thunderbird/songbird のGUIDなどのアプリケーション情報を調べるプラグイン appinfo.js git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@34181 d0d07461-0603-4401-acd4-de1884942a52 --- appinfo.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 appinfo.js (limited to 'appinfo.js') diff --git a/appinfo.js b/appinfo.js new file mode 100644 index 0000000..c746807 --- /dev/null +++ b/appinfo.js @@ -0,0 +1,40 @@ +// PLUGIN_INFO//{{{ +var PLUGIN_INFO = + + {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: -- cgit v1.2.3