1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 09:42:28 +01:00

Fix plugins[name]

This commit is contained in:
Kris Maglione
2009-01-10 18:51:24 -05:00
parent 047c7e5cf2
commit d0681e8aa7

View File

@@ -40,7 +40,7 @@ function Script(file)
return self;
}
plugins.contexts[file.path] = this;
this.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/, function (_0, _1) _1.toUpperCase());
this.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase());
this.PATH = file.path;
this.__context__ = this;
@@ -48,7 +48,7 @@ function Script(file)
for (let [,dir] in Iterator(io.getRuntimeDirectories("plugin")))
{
if (dir.contains(file, false))
plugins[name] = this.NAME;
plugins[this.NAME] = this;
}
}
Script.prototype = plugins;