diff options
author | anekos | 2009-11-27 10:37:36 +0000 |
---|---|---|
committer | anekos | 2009-11-27 10:37:36 +0000 |
commit | 4311f86991555f397d2075d3131b87d9f14282f6 (patch) | |
tree | 835b59258deaac582f38ecb804e130dbb61250eb /plugin_loader.js | |
parent | 5214682def684b3b9153ca161b4671aa2edd0583 (diff) | |
download | vimperator-plugins-4311f86991555f397d2075d3131b87d9f14282f6.tar.bz2 |
plugins.hoge に context を格納するようにした
plugins/ ディレクトリからのロードと同じ挙動
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36009 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'plugin_loader.js')
-rw-r--r-- | plugin_loader.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugin_loader.js b/plugin_loader.js index 83385a0..8b62c44 100644 --- a/plugin_loader.js +++ b/plugin_loader.js @@ -39,7 +39,7 @@ let PLUGIN_INFO = <name lang="ja">プラグインローダー</name> <description>to load plugins from specified directory at starting up Vimperator.</description> <description lang="ja">指定(ディレクトリ|プラグイン)を起動時にロードする</description> - <version>2.4.1</version> + <version>2.5.0</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -87,6 +87,13 @@ let PLUGIN_INFO = if (filter.test(file.path)) { liberator.log("Sourcing: " + file.path); io.source(file.path, false); + let ctx = liberator.plugins.contexts[file.path]; + if (ctx) { + if (typeof liberator.plugins[ctx.NAME] === 'undefined') + liberator.plugins[ctx.NAME] = ctx; + } else { + liberator.echoerr('plugin_loader.js: context not found (' + file.path + ')'); + } } }); } else { |