1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:27:58 +01:00

only source JavaScript files (*.js) from the plugin directory on startup

This commit is contained in:
Doug Kearns
2007-10-30 09:04:31 +00:00
parent 6bc2054ce2
commit 6db70d9852

View File

@@ -761,7 +761,7 @@ const vimperator = (function() //{{{
var files = vimperator.io.readDirectory(plugin_dir.path); var files = vimperator.io.readDirectory(plugin_dir.path);
vimperator.log("Sourcing plugin directory...", 3); vimperator.log("Sourcing plugin directory...", 3);
files.forEach(function(file) { files.forEach(function(file) {
if (!file.isDirectory()) if (!file.isDirectory() && /\.js$/.test(file.path))
vimperator.source(file.path, false); vimperator.source(file.path, false);
}); });
} }