1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 18:27:59 +01:00

Replace the *.vimp file extension with config specific extensions.

This commit is contained in:
Doug Kearns
2010-10-01 02:43:02 +10:00
parent 002522c179
commit 725cf1f1f7
12 changed files with 29 additions and 18 deletions

View File

@@ -86,8 +86,8 @@ const Events = Module("events", {
for (let file in dir.iterDirectory()) {
if (file.exists() && !file.isDirectory() && file.isReadable() &&
/^[\w_-]+(\.vimp)?$/i.test(file.leafName)) {
let name = file.leafName.replace(/\.vimp$/i, "");
RegExp("^[\\w_-]+(\\." + config.fileExtension + ")?$", "i").test(file.leafName)) {
let name = file.leafName.replace(RegExp("\\." + config.fileExtension + "$", "i"), "");
this._macros.set(name, {
keys: file.read().split("\n")[0],
timeRecorded: file.lastModifiedTime