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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user