1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 07:44:13 +01:00

Cleanup main.jsm. Add (currently disabled) command cacheing.

This commit is contained in:
Kris Maglione
2011-10-06 06:39:41 -04:00
parent 0319712917
commit f65aaea14d
10 changed files with 238 additions and 129 deletions

View File

@@ -71,12 +71,6 @@ var AutoCmdHive = Class("AutoCmdHive", Contexts.Hive, {
*/
var AutoCommands = Module("autocommands", {
init: function () {
update(this, {
hives: contexts.Hives("autocmd", AutoCmdHive),
user: contexts.hives.autocmd.user,
allHives: contexts.allGroups.autocmd,
matchingHives: function matchingHives(uri, doc) contexts.matchingGroups(uri, doc).autocmd
});
},
get activeHives() contexts.allGroups.autocmd.filter(function (h) h._store.length),
@@ -172,6 +166,14 @@ var AutoCommands = Module("autocommands", {
}
}, {
}, {
contexts: function () {
update(AutoCommands.prototype, {
hives: contexts.Hives("autocmd", AutoCmdHive),
user: contexts.hives.autocmd.user,
allHives: contexts.allGroups.autocmd,
matchingHives: function matchingHives(uri, doc) contexts.matchingGroups(uri, doc).autocmd
});
},
commands: function () {
commands.add(["au[tocmd]"],
"Execute commands automatically on events",