diff options
Diffstat (limited to 'twittperator.js')
-rwxr-xr-x | twittperator.js | 6 |
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); }); }); |