summaryrefslogtreecommitdiff
path: root/common/modules
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-02-04 20:24:50 -0500
committerKris Maglione <maglione.k@gmail.com>2011-02-04 20:24:50 -0500
commite9fd99dafa8e9ed0f479143ad098c96889e31e1b (patch)
tree73f84f68efa16c87f9e48199e176957b0a747dbe /common/modules
parent6a3d5dcfceeed29b77eb548fc3d7234c6ece3a00 (diff)
downloadpentadactyl-e9fd99dafa8e9ed0f479143ad098c96889e31e1b.tar.gz
Reset progress indicator on location change.
Diffstat (limited to 'common/modules')
-rw-r--r--common/modules/completion.jsm6
-rw-r--r--common/modules/finder.jsm2
-rw-r--r--common/modules/sanitizer.jsm25
3 files changed, 17 insertions, 16 deletions
diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm
index 1b788d4d..018b5d71 100644
--- a/common/modules/completion.jsm
+++ b/common/modules/completion.jsm
@@ -1015,7 +1015,7 @@ var Completion = Module("completion", {
options: function (dactyl, modules, window) {
const { completion, options } = modules;
let wildmode = {
- completer: function (context) [
+ values: [
// Why do we need ""?
// Because its description is useful during completion. --Kris
["", "Complete only the first match"],
@@ -1047,7 +1047,7 @@ var Completion = Module("completion", {
options.add(["complete", "cpt"],
"Items which are completed at the :open prompts",
"charlist", config.defaults.complete == null ? "slf" : config.defaults.complete,
- { completer: function (context) values(completion.urlCompleters) });
+ { get values() values(completion.urlCompleters) });
options.add(["wildanchor", "wia"],
"Define which completion groups only match at the beginning of their text",
@@ -1057,7 +1057,7 @@ var Completion = Module("completion", {
"Completion case matching mode",
"regexpmap", ".?:smart",
{
- completer: function () [
+ values: [
["smart", "Case is significant when capital letters are typed"],
["match", "Case is always significant"],
["ignore", "Case is never significant"]
diff --git a/common/modules/finder.jsm b/common/modules/finder.jsm
index b9ea7696..1e959f27 100644
--- a/common/modules/finder.jsm
+++ b/common/modules/finder.jsm
@@ -262,7 +262,7 @@ var RangeFinder = Module("rangefinder", {
"Find case matching mode",
"string", "smart",
{
- completer: function () [
+ values: [
["smart", "Case is significant when capital letters are typed"],
["match", "Case is always significant"],
["ignore", "Case is never significant"]
diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm
index 7295c07a..5b6be968 100644
--- a/common/modules/sanitizer.jsm
+++ b/common/modules/sanitizer.jsm
@@ -562,7 +562,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
"The default list of private items to sanitize",
"stringlist", "all",
{
- completer: function (value) values(sanitizer.itemMap),
+ get values() values(sanitizer.itemMap),
has: modules.Option.has.toggleAll,
validator: function (values) values.length &&
values.every(function (val) val === "all" || set.has(sanitizer.itemMap, val))
@@ -573,7 +573,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
"stringlist", "",
{
initialValue: true,
- completer: function () [i for (i in values(sanitizer.itemMap)) if (i.persistent || i.builtin)],
+ get values() [i for (i in values(sanitizer.itemMap)) if (i.persistent || i.builtin)],
getter: function () !sanitizer.runAtShutdown ? [] : [
item.name for (item in values(sanitizer.itemMap))
if (item.shouldSanitize(true))
@@ -598,36 +598,37 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
{
completer: function (context) {
context.compare = context.constructor.Sort.Unsorted;
- return [
+ context.completions = this.values;
+ },
+ values: [
["all", "Everything"],
["session", "The current session"],
["10m", "Last ten minutes"],
["1h", "Past hour"],
["1d", "Past day"],
["1w", "Past week"]
- ];
- },
+ ],
validator: function (value) /^(a(ll)?|s(ession)|\d+[mhdw])$/.test(value)
});
options.add(["cookies", "ck"],
"The default mode for newly added cookie permissions",
"stringlist", "session",
- { completer: function (context) iter(Sanitizer.COMMANDS) });
+ { get values() iter(Sanitizer.COMMANDS) });
options.add(["cookieaccept", "ca"],
"When to accept cookies",
"string", "all",
{
PREF: "network.cookie.cookieBehavior",
- completer: function (context) [
+ values: [
["all", "Accept all cookies"],
["samesite", "Accept all non-third-party cookies"],
["none", "Accept no cookies"]
],
- getter: function () (this.completer()[prefs.get(this.PREF)] || ["all"])[0],
+ getter: function () (this.values[prefs.get(this.PREF)] || ["all"])[0],
setter: function (val) {
- prefs.set(this.PREF, this.completer().map(function (i) i[0]).indexOf(val));
+ prefs.set(this.PREF, this.values.map(function (i) i[0]).indexOf(val));
return val;
},
initialValue: true,
@@ -639,14 +640,14 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
"string", "default", {
PREF: "network.cookie.lifetimePolicy",
PREF_DAYS: "network.cookie.lifetime.days",
- completer: function (context) [
+ values: [
["default", "The lifetime requested by the setter"],
["prompt", "Always prompt for a lifetime"],
["session", "The current session"]
],
- getter: function () (this.completer()[prefs.get(this.PREF)] || [prefs.get(this.PREF_DAYS)])[0],
+ getter: function () (this.values[prefs.get(this.PREF)] || [prefs.get(this.PREF_DAYS)])[0],
setter: function (value) {
- let val = this.completer().map(function (i) i[0]).indexOf(value);
+ let val = this.values.map(function (i) i[0]).indexOf(value);
if (val > -1)
prefs.set(this.PREF, val);
else {