mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 20:34:11 +01:00
Fix some early instantiation.
This commit is contained in:
@@ -282,7 +282,7 @@ var AutoCommands = Module("autocommands", {
|
||||
};
|
||||
},
|
||||
javascript: function () {
|
||||
JavaScript.setCompleter(autocommands.user.get, [function () Iterator(config.autocommands)]);
|
||||
JavaScript.setCompleter(AutoCmdHive.prototype.get, [function () Iterator(config.autocommands)]);
|
||||
},
|
||||
options: function () {
|
||||
options.add(["eventignore", "ei"],
|
||||
|
||||
@@ -796,7 +796,7 @@ var Mappings = Module("mappings", {
|
||||
};
|
||||
},
|
||||
javascript: function initJavascript(dactyl, modules, window) {
|
||||
JavaScript.setCompleter([mappings.get, mappings.builtin.get],
|
||||
JavaScript.setCompleter([Mappings.prototype.get, MapHive.prototype.get],
|
||||
[
|
||||
null,
|
||||
function (context, obj, args) [[m.names, m.description] for (m in this.iterate(args[0]))]
|
||||
|
||||
@@ -1622,9 +1622,9 @@ var Commands = Module("commands", {
|
||||
javascript: function initJavascript(dactyl, modules, window) {
|
||||
const { JavaScript, commands } = modules;
|
||||
|
||||
JavaScript.setCompleter([commands.user.get, commands.user.remove],
|
||||
JavaScript.setCompleter([CommandHive.prototype.get, CommandHive.prototype.remove],
|
||||
[function () [[c.names, c.description] for (c in this)]]);
|
||||
JavaScript.setCompleter([commands.get],
|
||||
JavaScript.setCompleter([Commands.prototype.get],
|
||||
[function () [[c.names, c.description] for (c in this.iterator())]]);
|
||||
},
|
||||
mappings: function initMappings(dactyl, modules, window) {
|
||||
|
||||
@@ -1533,7 +1533,7 @@ var Options = Module("options", {
|
||||
},
|
||||
javascript: function initJavascript(dactyl, modules, window) {
|
||||
const { options, JavaScript } = modules;
|
||||
JavaScript.setCompleter(options.get, [function () ([o.name, o.description] for (o in options))]);
|
||||
JavaScript.setCompleter(Options.prototype.get, [function () ([o.name, o.description] for (o in options))]);
|
||||
},
|
||||
sanitizer: function initSanitizer(dactyl, modules, window) {
|
||||
const { sanitizer } = modules;
|
||||
|
||||
@@ -198,11 +198,6 @@ var Services = Module("Services", {
|
||||
*/
|
||||
has: function (name) Set.has(this.services, name) && this.services[name].class in Cc &&
|
||||
this.services[name].interfaces.every(function (iface) iface in Ci)
|
||||
}, {
|
||||
}, {
|
||||
javascript: function (dactyl, modules) {
|
||||
modules.JavaScript.setCompleter(this.get, [function () [[k, v] for ([k, v] in Iterator(services)) if (v instanceof Ci.nsISupports)]]);
|
||||
}
|
||||
});
|
||||
|
||||
endModule();
|
||||
|
||||
@@ -728,7 +728,7 @@ var Styles = Module("Styles", {
|
||||
};
|
||||
},
|
||||
javascript: function (dactyl, modules, window) {
|
||||
modules.JavaScript.setCompleter(["get", "add", "remove", "find"].map(function (m) styles.user[m]),
|
||||
modules.JavaScript.setCompleter(["get", "add", "remove", "find"].map(function (m) Hive.prototype[m]),
|
||||
[ // Prototype: (name, filter, css, index)
|
||||
function (context, obj, args) this.names,
|
||||
function (context, obj, args) Styles.completeSite(context, window.content),
|
||||
|
||||
Reference in New Issue
Block a user