1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 20:17:59 +01:00

Fix: options.js initialization at loading

This commit is contained in:
teramako
2009-11-09 21:43:51 +09:00
parent 884411c39c
commit 1bad5ccc1a

View File

@@ -404,6 +404,9 @@ const Options = Module("options", {
requires: ["config", "highlight", "storage"], requires: ["config", "highlight", "storage"],
init: function () { init: function () {
this._optionHash = {};
this._prefContexts = [];
for (let [, pref] in Iterator(this.allPrefs(Options.OLD_SAVED))) { for (let [, pref] in Iterator(this.allPrefs(Options.OLD_SAVED))) {
let saved = Options.SAVED + pref.substr(Options.OLD_SAVED.length) let saved = Options.SAVED + pref.substr(Options.OLD_SAVED.length)
if (!this.getPref(saved)) if (!this.getPref(saved))
@@ -436,9 +439,6 @@ const Options = Module("options", {
storage.newMap("options", { store: false }); storage.newMap("options", { store: false });
storage.addObserver("options", optionObserver, window); storage.addObserver("options", optionObserver, window);
this._optionHash = {};
this._prefContexts = [];
this.prefObserver.register(); this.prefObserver.register();
}, },