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

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

This commit is contained in:
Doug Kearns
2007-10-28 07:09:05 +00:00
parent 3b06ae715f
commit 81a8ebecb6

View File

@@ -654,7 +654,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);
}); });
} }