1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 15:22:26 +01:00

dd more rudimentary completion for options 'activate', 'pageinfo', 'newtab'

and 'popups'
This commit is contained in:
Doug Kearns
2008-09-10 20:26:53 +00:00
parent 23ccb9a689
commit 0bb59f6c5c
4 changed files with 48 additions and 1 deletions

View File

@@ -167,6 +167,14 @@ liberator.Buffer = function () //{{{
liberator.options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm",
{
completer: function (filter)
{
return [
["g", "General info"],
["f", "Feeds"],
["m", "Meta tags"]
];
},
validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1); }
});

View File

@@ -66,6 +66,14 @@ const liberator = (function () //{{{
return value;
},
completer: function (filter)
{
return [
["m", "Menubar"],
["T", "Toolbar"],
["b", "Bookmark bar"]
];
},
validator: function (value)
{
var regex = "[^";

View File

@@ -160,6 +160,15 @@ liberator.Tabs = function () //{{{
"Define when tabs are automatically activated",
"stringlist", "homepage,quickmark,tabopen,paste",
{
completer: function (filter)
{
return [
["homepage", "gH mapping"],
["quickmark", "go and gn mappings"],
["tabopen", ":tabopen[!] command"],
["paste", "P and gP mappings"]
];
},
validator: function (value)
{
return value.split(",").every(function (item) { return /^(homepage|quickmark|tabopen|paste|)$/.test(item); });
@@ -170,6 +179,17 @@ liberator.Tabs = function () //{{{
"Define which commands should output in a new tab by default",
"stringlist", "",
{
completer: function (filter)
{
return [
["all", "All commands"],
["addons", ":addo[ns] command"],
["downloads", ":downl[oads] command"],
["help", ":h[elp] command"],
["javascript", ":javascript! or :js! command"],
["prefs", ":pref[erences]! or :prefs! command"]
];
},
validator: function (value)
{
return value == "all" || value.split(",").every(function (item) { return /^(addons|downloads|help|javascript|prefs|)$/.test(item); });
@@ -193,6 +213,16 @@ liberator.Tabs = function () //{{{
return value;
},
completer: function (filter)
{
return [
["0", "Force to open in the current tab"],
["1", "Always open in a new tab"],
["2", "Open in a new window if it has a specific requested size (default in Firefox)"],
["3", "Always open in a new window"],
["4", "Open in the same tab unless it has a specific requested size"]
];
},
validator: function (value) { return (value >= 0 && value <= 4); }
});
}