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:
@@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user