aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-07-31 13:28:01 +0000
committeranekos2010-07-31 13:28:01 +0000
commit69738e4e99457425f9ea3d3c26feb8de4e50c5e4 (patch)
tree4ab1b527fdcdaeae2aa78d81b52b75a173f838f7 /twittperator.js
parent44da48dcf205543752c61eaaf44b91282a60d603 (diff)
downloadvimperator-plugins-69738e4e99457425f9ea3d3c26feb8de4e50c5e4.tar.bz2
プラグインの有効かオプション追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38104 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-xtwittperator.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/twittperator.js b/twittperator.js
index 1edf0a6..aa2eb6b 100755
--- a/twittperator.js
+++ b/twittperator.js
@@ -1358,9 +1358,13 @@ function sourceScriptFile(file) { // {{{
}
} // }}}
function loadPlugins() { // {{{
+ function getVariableName(file)
+ file.leafName.replace(/\..*/, "").replace(/-/g, "_");
+
io.getRuntimeDirectories("plugin/twittperator").forEach(function(dir) {
dir.readDirectory().forEach(function(file) {
- if (/\.tw$/(file.path))
+ let name = getVariableName(file);
+ if (/\.tw$/(file.path) && liberator.globalVariables["twittperator_plugin_" + name])
sourceScriptFile(file);
});
});