mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 11:15:46 +01:00
Reset progress indicator on location change.
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user