diff --git a/common/content/configbase.js b/common/content/configbase.js index 18387102..f8d4ea34 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -80,15 +80,21 @@ const ConfigBase = Class(ModuleBase, { */ features: [], + /** + * @property {string} The file extension used for command script files. + * This is the name string sans "dactyl". + */ + get fileExtension() this.name.slice(0, -6), + guioptions: {}, hasTabbrowser: false, /** * @property {string} The name of the application that hosts the - * “liberated” application. E.g., "Firefox" or "Xulrunner". + * extension. E.g., "Firefox" or "XULRunner". */ - hostApplication: null, + host: null, /** * @property {Object} A map between key names for key events should be ignored, @@ -109,7 +115,7 @@ const ConfigBase = Class(ModuleBase, { modes: [], /** - * @property {string} The name of “liberated” application. + * @property {string} The name of the extension. * Required. */ name: null, diff --git a/common/content/dactyl.js b/common/content/dactyl.js index c830cc20..bb0b12e2 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -721,12 +721,12 @@ const Dactyl = Module("dactyl", { return; } - dactyl.echomsg('Searching for "plugins/**/*.{js,vimp}" in ' + dactyl.echomsg('Searching for "plugins/**/*.{js,' + config.fileExtension + '}" in ' + [dir.path.replace(/.plugins$/, "") for ([, dir] in Iterator(dirs))] .join(",").quote(), 2); dirs.forEach(function (dir) { - dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3); + dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js," + config.fileExtension + "}").quote(), 3); sourceDirectory(dir); }); }, @@ -1238,7 +1238,7 @@ const Dactyl = Module("dactyl", { options.add(["loadplugins", "lpl"], "A regex list that defines which plugins are loaded at startup and via :loadplugins", - "regexlist", "'\\.(js|vimp)$'"); + "regexlist", "'\\.(js|" + config.fileExtension + ")$'"); options.add(["titlestring"], "Change the title of the window", diff --git a/common/content/events.js b/common/content/events.js index d4ae92fa..bcbddf53 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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 diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml index 5f433c82..b9c85c4b 100644 --- a/common/locale/en-US/options.xml +++ b/common/locale/en-US/options.xml @@ -918,7 +918,7 @@ 'noloadplugins' 'loadplugins' 'loadplugins' 'lpl' regexlist - \.(js|vimp)$ + \.(js|&dactyl.fileExt;)$

A regular expression list that defines which plugins are loaded at @@ -937,7 +937,7 @@ omit in your &dactyl.name;rc using something like the below:

- :set loadplugins=!foo|bar,\.(js|vimp)$ + :set loadplugins=!foo|bar,\.(js|&dactyl.fileExt;)$

That will load all plugins but foo and bar.

diff --git a/common/locale/en-US/starting.xml b/common/locale/en-US/starting.xml index 73761785..f99bdf20 100644 --- a/common/locale/en-US/starting.xml +++ b/common/locale/en-US/starting.xml @@ -112,9 +112,9 @@

All directories in runtimepath are searched for a ‘plugins’ subdirectory and all yet unloaded plugins are loaded. - For each plugins directory, all *.{js,vimp} files (including - those in further subdirectories) are sourced alphabetically. No - plugins will be sourced if, + For each plugins directory, all *.{js,&dactyl.fileExt;} + files (including those in further subdirectories) are sourced + alphabetically. No plugins will be sourced if,