mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-18 10:15:46 +01:00
Replace expression closures (command/option/mapping definitions).
Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
@@ -516,16 +516,18 @@ var Bookmarks = Module("bookmarks", {
|
||||
context.completions = [
|
||||
[win.document.documentURI, frames.length == 1 ? /*L*/"Current Location" : /*L*/"Frame: " + win.document.title]
|
||||
for (win of frames)];
|
||||
return;
|
||||
}
|
||||
completion.bookmark(context, args["-tags"], { keyword: args["-keyword"], title: args["-title"] });
|
||||
else
|
||||
completion.bookmark(context, args["-tags"], { keyword: args["-keyword"], title: args["-title"] });
|
||||
},
|
||||
options: [keyword, title, tags, post,
|
||||
{
|
||||
names: ["-charset", "-c"],
|
||||
description: "The character encoding of the bookmark",
|
||||
type: CommandOption.STRING,
|
||||
completer: function (context) completion.charset(context),
|
||||
completer: function (context) {
|
||||
completion.charset(context);
|
||||
},
|
||||
validator: io.bound.validateCharset
|
||||
},
|
||||
{
|
||||
@@ -541,8 +543,7 @@ var Bookmarks = Module("bookmarks", {
|
||||
function (args) {
|
||||
bookmarks.list(args.join(" "), args["-tags"] || [], args.bang, args["-max"],
|
||||
{ keyword: args["-keyword"], title: args["-title"] });
|
||||
},
|
||||
{
|
||||
}, {
|
||||
bang: true,
|
||||
completer: function completer(context, args) {
|
||||
context.filter = args.join(" ");
|
||||
@@ -584,13 +585,15 @@ var Bookmarks = Module("bookmarks", {
|
||||
dactyl.echomsg({ message: _("bookmark.deleted", deletedCount) });
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
}, {
|
||||
argCount: "?",
|
||||
bang: true,
|
||||
completer: function completer(context, args)
|
||||
completion.bookmark(context, args["-tags"], { keyword: args["-keyword"], title: args["-title"] }),
|
||||
domains: function (args) Ary.compact(args.map(util.getHost)),
|
||||
completer: function completer(context, args) {
|
||||
completion.bookmark(context, args["-tags"], { keyword: args["-keyword"], title: args["-title"] });
|
||||
},
|
||||
domains: function (args) {
|
||||
return Ary.compact(args.map(util.getHost));
|
||||
},
|
||||
literal: 0,
|
||||
options: [tags, title, keyword],
|
||||
privateData: true
|
||||
@@ -643,14 +646,21 @@ var Bookmarks = Module("bookmarks", {
|
||||
{
|
||||
completer: function completer(context) {
|
||||
completion.search(context, true);
|
||||
context.completions = [{ keyword: "", title: "Don't perform searches by default" }].concat(context.completions);
|
||||
context.completions = [{
|
||||
keyword: "",
|
||||
title: "Don't perform searches by default"
|
||||
}].concat(context.completions);
|
||||
}
|
||||
});
|
||||
|
||||
options.add(["suggestengines"],
|
||||
"Search engines used for search suggestions",
|
||||
"stringlist", "google",
|
||||
{ completer: function completer(context) completion.searchEngine(context, true) });
|
||||
{
|
||||
completer: function completer(context) {
|
||||
completion.searchEngine(context, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
completion: function initCompletion() {
|
||||
|
||||
Reference in New Issue
Block a user