mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 23:44:11 +01:00
Fix useragent.js bug.
This commit is contained in:
@@ -1483,7 +1483,7 @@ var Commands = Module("commands", {
|
|||||||
|
|
||||||
let start = "«%-d-]'", end = "'[-d-%»";
|
let start = "«%-d-]'", end = "'[-d-%»";
|
||||||
|
|
||||||
let n = /^\d+$/.test(cmd.argCount) ? parseInt(argCount) : 12;
|
let n = /^\d+$/.test(cmd.argCount) ? parseInt(cmd.argCount) : 12;
|
||||||
for (let i = args.completeArg; i < n; i++)
|
for (let i = args.completeArg; i < n; i++)
|
||||||
args[i] = start + i + end;
|
args[i] = start + i + end;
|
||||||
|
|
||||||
|
|||||||
@@ -199,10 +199,18 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
|||||||
*/
|
*/
|
||||||
getNames: function getNames(branch) this.branch.getChildList(branch || "", { value: 0 }),
|
getNames: function getNames(branch) this.branch.getChildList(branch || "", { value: 0 }),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the current branch has the given preference.
|
||||||
|
*
|
||||||
|
* @param {string} name The preference name.
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
has: function get(name) this.branch.getPrefType(name) != 0,
|
||||||
|
|
||||||
_checkSafe: function _checkSafe(name, message, value) {
|
_checkSafe: function _checkSafe(name, message, value) {
|
||||||
let curval = this.get(name, null);
|
let curval = this.get(name, null);
|
||||||
|
|
||||||
if (this.branches.original.get(name) == null)
|
if (this.branches.original.get(name) == null && !this.branches.saved.has(name))
|
||||||
this.branches.original.set(name, curval, true);
|
this.branches.original.set(name, curval, true);
|
||||||
|
|
||||||
if (arguments.length > 2 && curval === value)
|
if (arguments.length > 2 && curval === value)
|
||||||
|
|||||||
Reference in New Issue
Block a user