From 69738e4e99457425f9ea3d3c26feb8de4e50c5e4 Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 31 Jul 2010 13:28:01 +0000 Subject: プラグインの有効かオプション追加 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38104 d0d07461-0603-4401-acd4-de1884942a52 --- twittperator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }); }); -- cgit v1.2.3