From 4311f86991555f397d2075d3131b87d9f14282f6 Mon Sep 17 00:00:00 2001
From: anekos
Date: Fri, 27 Nov 2009 10:37:36 +0000
Subject: plugins.hoge に context を格納するようにした
plugins/ ディレクトリからのロードと同じ挙動
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36009 d0d07461-0603-4401-acd4-de1884942a52
---
plugin_loader.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'plugin_loader.js')
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 =
プラグインローダー
to load plugins from specified directory at starting up Vimperator.
指定(ディレクトリ|プラグイン)を起動時にロードする
- 2.4.1
+ 2.5.0
anekos
new BSD License (Please read the source code comments of this plugin)
修正BSDライセンス (ソースコードのコメントを参照してください)
@@ -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 {
--
cgit v1.2.3