diff options
author | anekos | 2010-03-20 11:07:08 +0000 |
---|---|---|
committer | anekos | 2010-03-20 11:07:08 +0000 |
commit | 82c34b0ac10b768628183bd5eb16641e7816f12f (patch) | |
tree | ffbb62df9797996c2d25f521738fdfa287d40c2d /reporter.js | |
parent | 92d5ab4429f4da95efe75618401cbbdc4ebd5d29 (diff) | |
download | vimperator-plugins-82c34b0ac10b768628183bd5eb16641e7816f12f.tar.bz2 |
基本情報追加 - basic
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37066 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'reporter.js')
-rwxr-xr-x | reporter.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/reporter.js b/reporter.js index 414ce40..78f6695 100755 --- a/reporter.js +++ b/reporter.js @@ -117,6 +117,14 @@ let PLUGIN_INFO = const LIMIT_OPTION = [['-length-limit', '-ll'], commands.OPTION_INT]; const Writer = { + basic: function (file) { + function puts (name, value) + file.writeln(pad(name + ': ', 20) + value); + puts('Name', config.name); + puts('Host', config.hostApplication); + puts('Platform', navigator.platform); + }, + colors: function (file) { function rmrem (s) s.replace(/\s*\/\*.*\*\//g, ''); @@ -154,6 +162,10 @@ let PLUGIN_INFO = file.writeln(ext.name); file.writeln(' ' + (ext.enabled ? 'enabled' : 'disabled')); } + }, + + plugins: function (file) { + [File(n).leafName for (n in plugins.contexts)].sort().forEach(function (n) file.writeln(n)); } }; @@ -176,16 +188,19 @@ let PLUGIN_INFO = options: [LIMIT_OPTION], action: function (file, args) { function writeSection (title, writer) { - file.writeln('""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'); + const line = '"======================================================================'; + file.writeln(line); file.writeln('" ' + title); - file.writeln(''); + file.writeln(line + '\n'); writer(file, args); file.writeln('\n'); } - writeSection('Color Scheme', Writer.colors); - writeSection(config.hostApplication + ' Preference', Writer.preferences); + writeSection('Basic', Writer.basic); + writeSection(config.name + ' Plugin', Writer.plugins); writeSection(config.hostApplication + ' Addon & Plugin', Writer.addons); + writeSection(config.hostApplication + ' Preference', Writer.preferences); + writeSection('Color Scheme', Writer.colors); } }); |