summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/content/buffer.js10
-rw-r--r--common/content/hints.js41
-rw-r--r--common/content/tabs.js38
-rw-r--r--common/locale/en-US/developer.xml4
-rw-r--r--common/locale/en-US/editing.xml2
-rw-r--r--common/locale/en-US/hints.xml2
-rw-r--r--common/locale/en-US/map.xml53
-rw-r--r--common/locale/en-US/message.xml47
-rw-r--r--common/locale/en-US/options.xml4
-rw-r--r--common/locale/en-US/privacy.xml2
-rw-r--r--common/locale/en-US/various.xml2
-rw-r--r--common/modules/commands.jsm2
-rw-r--r--common/modules/completion.jsm30
-rw-r--r--common/modules/contexts.jsm4
-rw-r--r--common/modules/finder.jsm10
-rw-r--r--common/modules/options.jsm6
-rw-r--r--common/modules/sanitizer.jsm18
17 files changed, 147 insertions, 128 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js
index 759fe0b4..da1ac020 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -1840,11 +1840,11 @@ var Buffer = Module("buffer", {
"Where to show the destination of the link under the cursor",
"string", "status",
{
- values: [
- ["", "Don't show link destinations"],
- ["status", "Show link destinations in the status line"],
- ["command", "Show link destinations in the command line"]
- ]
+ values: {
+ "": "Don't show link destinations",
+ "status": "Show link destinations in the status line",
+ "command": "Show link destinations in the command line"
+ }
});
options.add(["usermode", "um"],
diff --git a/common/content/hints.js b/common/content/hints.js
index 5183e0a7..e22d79a0 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -1241,9 +1241,10 @@ var Hints = Module("hints", {
"The keys used to label and select hints",
"string", "0123456789",
{
- values: [
- ["0123456789", "Numbers"],
- ["asdfg;lkjh", "Home Row"]],
+ values: {
+ "0123456789": "Numbers",
+ "asdfg;lkjh": "Home Row"
+ },
validator: function (value) {
let values = events.fromString(value).map(events.closure.toString);
return Option.validIf(array.uniq(values).length === values.length,
@@ -1262,24 +1263,24 @@ var Hints = Module("hints", {
"Change the behavior of <Return> in hint mode",
"number", 0,
{
- values: [
- ["0", "Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on <Return>."],
- ["1", "Follow the selected hint on <Return>."],
- ["2", "Follow the selected hint on <Return> only it's been <Tab>-selected."]
- ]
+ values: {
+ "0": "Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on <Return>.",
+ "1": "Follow the selected hint on <Return>.",
+ "2": "Follow the selected hint on <Return> only it's been <Tab>-selected."
+ }
});
options.add(["hintmatching", "hm"],
"How hints are filtered",
"stringlist", "contains",
{
- values: [
- ["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."],
- ["custom", "Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)"],
- ["firstletters", "Behaves like wordstartswith, but all groups must match a sequence of words."],
- ["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginnings of words, in order."],
- ["transliterated", UTF8("When true, special latin characters are translated to their ASCII equivalents (e.g., é ⇒ e)")]
- ],
+ values: {
+ "contains": "The typed characters are split on whitespace. The resulting groups must all appear in the hint.",
+ "custom": "Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)",
+ "firstletters": "Behaves like wordstartswith, but all groups must match a sequence of words.",
+ "wordstartswith": "The typed characters are split on whitespace. The resulting groups must all match the beginnings of words, in order.",
+ "transliterated": UTF8("When true, special latin characters are translated to their ASCII equivalents (e.g., é ⇒ e)")
+ },
validator: function (values) Option.validateCompleter.call(this, values) &&
1 === values.reduce(function (acc, v) acc + (["contains", "custom", "firstletters", "wordstartswith"].indexOf(v) >= 0), 0)
});
@@ -1293,11 +1294,11 @@ var Hints = Module("hints", {
"Which text is used to filter hints for input elements",
"stringlist", "label,value",
{
- values: [
- ["value", "Match against the value of the input field"],
- ["label", "Match against the text of a label for the input field, if one can be found"],
- ["name", "Match against the name of the input field"]
- ]
+ values: {
+ "value": "Match against the value of the input field",
+ "label": "Match against the text of a label for the input field, if one can be found",
+ "name": "Match against the name of the input field"
+ }
});
}
});
diff --git a/common/content/tabs.js b/common/content/tabs.js
index 6426c749..00456110 100644
--- a/common/content/tabs.js
+++ b/common/content/tabs.js
@@ -987,11 +987,11 @@ var Tabs = Module("tabs", {
config.tabbrowser.tabContainer._positionPinnedTabs();
return value;
},
- values: [
- ["never", "Never show the tab bar"],
- ["multitab", "Show the tab bar when there are multiple tabs"],
- ["always", "Always show the tab bar"]
- ]
+ values: {
+ "never": "Never show the tab bar",
+ "multitab": "Show the tab bar when there are multiple tabs",
+ "always": "Always show the tab bar"
+ }
});
if (config.hasTabbrowser) {
@@ -1030,15 +1030,15 @@ var Tabs = Module("tabs", {
"Define which commands should output in a new tab by default",
"stringlist", "",
{
- values: [
- ["all", "All commands"],
- ["addons", ":addo[ns] command"],
- ["downloads", ":downl[oads] command"],
- ["extoptions", ":exto[ptions] command"],
- ["help", ":h[elp] command"],
- ["javascript", ":javascript! or :js! command"],
- ["prefs", ":pref[erences]! or :prefs! command"]
- ],
+ values: {
+ "all": "All commands",
+ "addons": ":addo[ns] command",
+ "downloads": ":downl[oads] command",
+ "extoptions": ":exto[ptions] command",
+ "help": ":h[elp] command",
+ "javascript": ":javascript! or :js! command",
+ "prefs": ":pref[erences]! or :prefs! command"
+ },
has: Option.has.toggleAll
});
@@ -1064,11 +1064,11 @@ var Tabs = Module("tabs", {
"See 'popups' option.");
return values;
},
- values: [
- ["tab", "Open popups in a new tab"],
- ["window", "Open popups in a new window"],
- ["resized", "Open resized popups in a new window"]
- ]
+ values: {
+ "tab": "Open popups in a new tab",
+ "window": "Open popups in a new window",
+ "resized": "Open resized popups in a new window"
+ }
});
}
}
diff --git a/common/locale/en-US/developer.xml b/common/locale/en-US/developer.xml
index 8e0602b5..43fb99ed 100644
--- a/common/locale/en-US/developer.xml
+++ b/common/locale/en-US/developer.xml
@@ -102,8 +102,8 @@
</dd>
<dt>&tab;@mode</dt> <dd>The mode attribute to &lt;k>. Some keys have different functions in different modes.
You can use this attribute to specify which of the modes (other than Normal) a key pertains to.
- The &lt;<a>value</a>> is prepended to the element's contents, i.e., <em>&lt;k name="C-i" mode="i"/></em>
- becomes <em><k name="C-i" mode="i"/></em>, and <em>&lt;k mode="i">i&lt;/k></em> becomes <em><k mode="i">i</k></em>.
+ The &lt;<a>value</a>> is prepended to the element's contents, i.e., <em>&lt;k name="C-i" mode="I"/></em>
+ becomes <em><k name="C-i" mode="I"/></em>, and <em>&lt;k mode="t">i&lt;/k></em> becomes <em><k mode="t">i</k></em>.
</dd>
<dt>t</dt> <dd>Links to an arbitrary help topic. (HelpTopic)</dd>
</dl>
diff --git a/common/locale/en-US/editing.xml b/common/locale/en-US/editing.xml
index 608a77c0..1ad5b62c 100644
--- a/common/locale/en-US/editing.xml
+++ b/common/locale/en-US/editing.xml
@@ -31,7 +31,7 @@
<p>
Text Edit mode provides basic Vim-like text editing. It can be entered
- from Insert mode by pressing <k name="C-t" mode="i"/> or started directly
+ from Insert mode by pressing <k name="C-t" mode="I"/> or started directly
when a text area is focused if <o>insertmode</o> is unset. See the
<link topic="t-map-index">index</link> for a list of currently supported
mappings.
diff --git a/common/locale/en-US/hints.xml b/common/locale/en-US/hints.xml
index 0fb2c512..c69849a2 100644
--- a/common/locale/en-US/hints.xml
+++ b/common/locale/en-US/hints.xml
@@ -65,7 +65,7 @@
<description>
<p>
Start <t>QuickHint</t> mode, but the selected elements
- are clicked with the <k name="Shift"/> key pressed,
+ are clicked with the <k name="Shift" link="false"/> key pressed,
which has the normal effect of opening it in a new tab
(depending on the value of the
<pref>browser.tabs.loadInBackground</pref> preference).
diff --git a/common/locale/en-US/map.xml b/common/locale/en-US/map.xml
index f83b99b1..9cdb9390 100644
--- a/common/locale/en-US/map.xml
+++ b/common/locale/en-US/map.xml
@@ -37,11 +37,11 @@
For instance,
</p>
-<code><ex>:map <k name="F2"/></ex> <ex>:echo Date()<k name="CR"/></ex></code>
+<code><ex>:map <k name="F2" link="false"/></ex> <ex>:echo Date()<k name="CR"/></ex></code>
<p>
causes “<ex>:echo Date()<k name="CR"/></ex>” to be typed out
- whenever <k name="F2"/> is pressed, thus echoing the full date
+ whenever <k name="F2" link="false"/> is pressed, thus echoing the full date
to the command line.
</p>
@@ -221,15 +221,6 @@
<h3 tag=":map-arguments">Special arguments</h3>
-<tags>:map-&lt;silent></tags>
-
-<p>
- When the first argument to one of the mapping commands is
- <k name="silent"/>, the keys in <a>rhs</a> are not shown in the
- command line as they are generated. Nor, for that matter, is
- anything else until the command has completed.
-</p>
-
<p>
Below is an overview of which modes each map command applies to:
</p>
@@ -262,7 +253,7 @@
quotation marks or back-slashes. A space may additionally be
typed as <k name="Space"/>.
</li>
- <li>
+ <li key="&lt;lt>">
As special key names start with the <em>&lt;</em> character,
a literal &lt; must be typed as <k name="lt"/>.
</li>
@@ -271,8 +262,8 @@
and <k name="Down"/> represent the standard arrow keys.
</li>
<li>
- <k name="CapsLock"/>, <k name="NumLock"/>, <k name="Ins"/>
- <k name="Del"/>, <k name="Tab"/>, <k name="PageUp"/>,
+ <k name="CapsLock" link="false"/>, <k name="NumLock" link="false"/>, <k name="Insert"/>
+ <k name="Del" link="false"/>, <k name="Tab"/>, <k name="PageUp"/>,
<k name="PageDown"/>, and <k name="Esc"/> work as
expected.
</li>
@@ -280,16 +271,16 @@
<k name="Return" link="false"/> or <k name="CR"/> represent the carriage
return key.
</li>
- <li><k name="BS"/> represents the backspace key.</li>
- <li><k name="F1"/> through <k name="F12"/> work as expected.</li>
+ <li><k name="BS" link="false"/> represents the backspace key.</li>
+ <li><k name="F1"/> through <k name="F12" link="false"/> work as expected.</li>
<li>
- <k name="K0"/> through <k name="K9"/> represent keys on the
+ <k name="K0" link="false"/> through <k name="K9" link="false"/> represent keys on the
numeric keypad.
</li>
<li>
- <k name="Uxxxx"/>, where <em>xxxx</em> is any 4 hexadecimal
+ <k name="Uxxxx" link="false"/>, where <em>xxxx</em> is any 4 hexadecimal
digits, represents the character at that Unicode codepoint.
- For instance, <k name="U263a"/> represents ☺.
+ For instance, <k name="U263a" link="false"/> represents ☺.
</li>
</ul>
@@ -299,10 +290,10 @@
</p>
<ol>
- <li><k name="C-␣"/>: The control or ctrl key.</li>
- <li><k name="A-␣"/>: The alt key.</li>
- <li><k name="M-␣"/>: The meta key, windows key, or command key.</li>
- <li><k name="S-␣"/>: The shift key.</li>
+ <li><k name="C-␣" link="false"/>: The control or ctrl key.</li>
+ <li><k name="A-␣" link="false"/>: The alt key.</li>
+ <li><k name="M-␣" link="false"/>: The meta key, windows key, or command key.</li>
+ <li><k name="S-␣" link="false"/>: The shift key.</li>
</ol>
<p>
@@ -319,31 +310,31 @@
</p>
<dl dt="width: 10em;">
- <dt><k>xc</k></dt>
+ <dt><k link="false">xc</k></dt>
<dd>Type the ‘X’ key followed by the ‘C’ key.</dd>
- <dt><k name="C-x">c</k></dt>
+ <dt><k name="C-x" link="false">c</k></dt>
<dd>
Type the ‘X’ key while holding the ‘Control’ key, followed
by the ‘C’ key.
</dd>
- <dt><k name="C-2"/></dt>
+ <dt><k name="C-2" link="false"/></dt>
<dd>Type the ‘2’ while holding the ‘Control’ key.</dd>
- <dt><k name="C-@"/></dt>
+ <dt><k name="C-@" link="false"/></dt>
<dd>Type the ‘@’ key while holding the ‘Control’ key.</dd>
- <dt><k name="S-Space"/></dt>
+ <dt><k name="S-Space" link="false"/></dt>
<dd>Press the space bar while holding the ‘Shift’ key.</dd>
- <dt><k name="C-A-j"/></dt>
+ <dt><k name="C-A-j" link="false"/></dt>
<dd>Type the ‘J’ key while while holding both the ‘Control’ and ‘Alt’ keys.</dd>
- <dt><k name="C-A-J"/></dt>
+ <dt><k name="C-A-J" link="false"/></dt>
<dd>Exactly the same as above.</dd>
- <dt><k name="C-A-S-j"/></dt>
+ <dt><k name="C-A-S-j" link="false"/></dt>
<dd>Type the ‘J’ key while while holding both the ‘Control’, ‘Alt’, and ‘Shift’ keys.</dd>
</dl>
diff --git a/common/locale/en-US/message.xml b/common/locale/en-US/message.xml
index b96da815..a51edd43 100644
--- a/common/locale/en-US/message.xml
+++ b/common/locale/en-US/message.xml
@@ -66,20 +66,43 @@
</p>
<dl>
- <dt><k name="CR"/> or j or <k name="Down"/></dt> <dd>one more line</dd>
- <dt>d</dt> <dd>down a page (half a screen)</dd>
- <dt><k name="Space"/> or <k name="PageDown"/></dt><dd>down a screen</dd>
- <dt>G</dt> <dd>down all the way, until the hit-enter prompt</dd>
+ <dt><k name="CR" link="false"/> or j or <k name="Down" link="false"/></dt>
+ <dd>one more line</dd>
+
+ <dt>d</dt>
+ <dd>down a page (half a screen)</dd>
+
+ <dt><k name="Space" link="false"/> or <k name="PageDown" link="false"/></dt>
+ <dd>down a screen</dd>
+
+ <dt>G</dt>
+ <dd>down all the way, until the hit-enter prompt</dd>
+
<dt/><dd/>
- <dt><k name="BS"/> or k or <k name="Up"/></dt> <dd>one line back</dd>
- <dt>u</dt> <dd>up a page (half a screen)</dd>
- <dt>b or <k name="PageUp"/></dt> <dd>back a screen</dd>
- <dt>g</dt> <dd>back to the start</dd>
+ <dt><k name="BS" link="false"/> or k or <k name="Up" link="false"/></dt>
+ <dd>one line back</dd>
+
+ <dt>u</dt>
+ <dd>up a page (half a screen)</dd>
+
+ <dt>b or <k name="PageUp" link="false"/></dt>
+ <dd>back a screen</dd>
+
+ <dt>g</dt>
+ <dd>back to the start</dd>
+
<dt/><dd/>
- <dt>q, <k name="Esc"/> or <k name="C-c"></k></dt> <dd>stop the listing</dd>
- <dt>:</dt> <dd>stop the listing and enter a command line</dd>
- <dt>;</dt> <dd>start an <t>extended-hints</t> command</dd>
- <dt><k name="C-y"/></dt> <dd>yank (copy) a modeless selection to the clipboard</dd>
+ <dt>q, <k name="Esc" link="false"/> or <k name="C-c"></k></dt>
+ <dd>stop the listing</dd>
+
+ <dt>:</dt>
+ <dd>stop the listing and enter a command line</dd>
+
+ <dt>;</dt>
+ <dd>start an <t>extended-hints</t> command</dd>
+
+ <dt><k name="C-y" link="false"/></dt>
+ <dd>yank (copy) a modeless selection to the clipboard</dd>
</dl>
</document>
diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml
index 488f6ce1..9f911abf 100644
--- a/common/locale/en-US/options.xml
+++ b/common/locale/en-US/options.xml
@@ -548,7 +548,7 @@
<description>
<p>
Set the external text editor.
- This is the editor used by <k name="C-i" mode="i"/>, <k>gF</k>, and
+ This is the editor used by <k name="C-i" mode="I"/>, <k>gF</k>, and
other commands which launch an external text editor.
</p>
@@ -930,7 +930,7 @@
</p>
<p>
- TextEdit mode can be entered with <k name="C-t" mode="i"/> from Insert mode.
+ TextEdit mode can be entered with <k name="C-t" mode="I"/> from Insert mode.
</p>
</description>
</item>
diff --git a/common/locale/en-US/privacy.xml b/common/locale/en-US/privacy.xml
index 66092de2..84dafa98 100644
--- a/common/locale/en-US/privacy.xml
+++ b/common/locale/en-US/privacy.xml
@@ -147,7 +147,7 @@
If no <oa>action</oa> is given, the value of <o>cookies</o> is used.
</p>
- <example><ex>:map -b</ex> <k>c</k> <ex>:cookies</ex> <k name="A-Tab"/></example>
+ <example><ex>:map -b</ex> <k link="false">c</k> <ex>:cookies</ex> <k name="A-Tab" link="false"/></example>
</description>
</item>
diff --git a/common/locale/en-US/various.xml b/common/locale/en-US/various.xml
index ac5ee93f..78ade2e5 100644
--- a/common/locale/en-US/various.xml
+++ b/common/locale/en-US/various.xml
@@ -261,7 +261,7 @@
<description>
<p>
Start Caret mode. This mode resembles the Vim's Normal mode where
- the text cursor is visible on the web page. The <k>v</k> key
+ the text cursor is visible on the web page. The <k link="false">v</k> key
enters visual mode, where text is selected as the cursor moves.
</p>
</description>
diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm
index 6c783966..cc989bf5 100644
--- a/common/modules/commands.jsm
+++ b/common/modules/commands.jsm
@@ -1084,7 +1084,7 @@ var Commands = Module("commands", {
complete.advance(args.completeStart);
complete.keys = {
text: "names",
- description: function (opt) messages.get(["command", params.name, opt.names[0], "description"].join("."), opt.description)
+ description: function (opt) messages.get(["command", params.name, "options", opt.names[0], "description"].join("."), opt.description)
};
complete.title = ["Options"];
if (completeOpts)
diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm
index 1cc24f6f..b7a34e54 100644
--- a/common/modules/completion.jsm
+++ b/common/modules/completion.jsm
@@ -84,6 +84,8 @@ var CompletionContext = Class("CompletionContext", {
*/
self.waitingForTab = false;
+ self.hasItems = null;
+
delete self._generate;
delete self.ignoreCase;
if (self != this)
@@ -329,7 +331,7 @@ var CompletionContext = Class("CompletionContext", {
* The message displayed at the head of the completions for the
* current context.
*/
- get message() this._message || (this.waitingForTab ? "Waiting for <Tab>" : null),
+ get message() this._message || (this.waitingForTab && this.hasItems !== false ? "Waiting for <Tab>" : null),
set message(val) this._message = val,
/**
@@ -1014,16 +1016,16 @@ var Completion = Module("completion", {
options: function (dactyl, modules, window) {
const { completion, options } = modules;
let wildmode = {
- values: [
+ values: {
// Why do we need ""?
// Because its description is useful during completion. --Kris
- ["", "Complete only the first match"],
- ["full", "Complete the next full match"],
- ["longest", "Complete the longest common string"],
- ["list", "If more than one match, list all matches"],
- ["list:full", "List all and complete first match"],
- ["list:longest", "List all and complete the longest common string"]
- ],
+ "": "Complete only the first match",
+ "full": "Complete the next full match",
+ "longest": "Complete the longest common string",
+ "list": "If more than one match, list all matches",
+ "list:full": "List all and complete first match",
+ "list:longest": "List all and complete the longest common string"
+ },
checkHas: function (value, val) {
let [first, second] = value.split(":", 2);
return first == val || second == val;
@@ -1056,11 +1058,11 @@ var Completion = Module("completion", {
"Completion case matching mode",
"regexpmap", ".?:smart",
{
- values: [
- ["smart", "Case is significant when capital letters are typed"],
- ["match", "Case is always significant"],
- ["ignore", "Case is never significant"]
- ]
+ values: {
+ "smart": "Case is significant when capital letters are typed",
+ "match": "Case is always significant",
+ "ignore": "Case is never significant"
+ }
});
options.add(["wildmode", "wim"],
diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm
index 902d684d..9693e741 100644
--- a/common/modules/contexts.jsm
+++ b/common/modules/contexts.jsm
@@ -288,7 +288,7 @@ var Contexts = Module("contexts", {
initializedGroups: function (hive)
let (need = hive ? [hive] : Object.keys(this.hives))
- this.groupList.filter(function (group) need.some(function (name) set.has(group, name))),
+ this.groupList.filter(function (group) need.some(set.has(group))),
addGroup: function addGroup(name, description, filter, persist, replace) {
let group = this.getGroup(name);
@@ -482,7 +482,7 @@ var Contexts = Module("contexts", {
util.assert(!group.builtin ||
!["-description", "-locations", "-nopersist"]
- .some(function (arg) set.has(args.explicitOpts, arg)),
+ .some(set.has(args.explicitOpts)),
_("group.cantModifyBuiltin"));
},
{
diff --git a/common/modules/finder.jsm b/common/modules/finder.jsm
index a6c84165..a5d60c58 100644
--- a/common/modules/finder.jsm
+++ b/common/modules/finder.jsm
@@ -264,11 +264,11 @@ var RangeFinder = Module("rangefinder", {
"Find case matching mode",
"string", "smart",
{
- values: [
- ["smart", "Case is significant when capital letters are typed"],
- ["match", "Case is always significant"],
- ["ignore", "Case is never significant"]
- ]
+ values: {
+ "smart": "Case is significant when capital letters are typed",
+ "match": "Case is always significant",
+ "ignore": "Case is never significant"
+ }
});
options.add(["incfind", "if"],
diff --git a/common/modules/options.jsm b/common/modules/options.jsm
index 41a8323d..c5a6fa38 100644
--- a/common/modules/options.jsm
+++ b/common/modules/options.jsm
@@ -691,11 +691,13 @@ var Option = Class("Option", {
if (!acceptable)
acceptable = context.allItems.items.map(function (item) [item.text]);
}
- if (this.type === "regexpmap" || this.type === "sitemap")
- return Array.concat(values).every(function (re) acceptable.some(function (item) item[0] == re.result));
if (isArray(acceptable))
acceptable = set(acceptable.map(function ([k]) k));
+
+ if (this.type === "regexpmap" || this.type === "sitemap")
+ return Array.concat(values).every(function (re) set.has(acceptable, re.result));
+
return Array.concat(values).every(set.has(acceptable));
}
});
diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm
index dd18ab27..213f63da 100644
--- a/common/modules/sanitizer.jsm
+++ b/common/modules/sanitizer.jsm
@@ -566,7 +566,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
"The default list of private items to sanitize",
"stringlist", "all",
{
- get values() values(sanitizer.itemMap),
+ get values() values(sanitizer.itemMap).toArray(),
has: modules.Option.has.toggleAll,
validator: function (values) values.length &&
values.every(function (val) val === "all" || set.has(sanitizer.itemMap, val))
@@ -604,14 +604,14 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
context.compare = context.constructor.Sort.Unsorted;
context.completions = this.values;
},
- values: [
- ["all", "Everything"],
- ["session", "The current session"],
- ["10m", "Last ten minutes"],
- ["1h", "Past hour"],
- ["1d", "Past day"],
- ["1w", "Past week"]
- ],
+ 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)
});