diff --git a/common/content/modes.js b/common/content/modes.js index 40246f42..6666dc46 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -628,7 +628,8 @@ var Modes = Module("modes", { validator: function validator(vals) vals.map(v => v.replace(/^!/, "")) .every(k => hasOwnProperty(this.values, k)), - get values() array.toObject([[m.name.toLowerCase(), m.description] for (m in values(modes._modes)) if (!m.hidden)]) + get values() array.toObject([[m.name.toLowerCase(), m.description] + for (m in values(modes._modes)) if (!m.hidden)]) }; options.add(["passunknown", "pu"], diff --git a/common/modules/options.jsm b/common/modules/options.jsm index af16f43f..f973a453 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -95,7 +95,9 @@ var Option = Class("Option", { return this.globalValue = this.defaultValue; }, set globalValue(val) { - options.store.set(this.name, { value: val, time: Date.now() }); + options.store.set(this.name, + { value: this.parse(this.stringify(val)), + time: Date.now() }); }, /** @@ -140,6 +142,9 @@ var Option = Class("Option", { if ((scope & Option.SCOPE_GLOBAL) && (values == undefined)) values = this.globalValue; + if (hasOwnProperty(this, "_value")) + values = this._value; + if (this.getter) return util.trapErrors(this.getter, this, values); @@ -169,6 +174,7 @@ var Option = Class("Option", { */ if ((scope & Option.SCOPE_GLOBAL) && !skipGlobal) this.globalValue = newValues; + this._value = newValues; this.hasChanged = true; this.setFrom = null;