diff --git a/common/content/dactyl.js b/common/content/dactyl.js index f5824435..1bb6a68a 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -605,6 +605,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { * Initialize the help system. */ initHelp: function (force) { + // Waits for the add-on to become available, if necessary. + config.addon; + config.version; + if (force || !this.helpInitialized) { if ("noscriptOverlay" in window) { noscriptOverlay.safeAllow("chrome-data:", true, false); diff --git a/common/content/modes.js b/common/content/modes.js index 2840ea6c..4976db15 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -207,6 +207,51 @@ var Modes = Module("modes", { } }); + + function makeTree() { + let list = modes.all.filter(function (m) m.name !== m.description); + + let tree = {}; + + for (let mode in values(list)) + tree[mode.name] = {}; + + for (let mode in values(list)) + for (let base in values(mode.bases)) + tree[base.name][mode.name] = tree[mode.name]; + + let roots = iter([m.name, tree[m.name]] for (m in values(list)) if (!m.bases.length)).toObject(); + + default xml namespace = NS; + function rec(obj) { + XML.ignoreWhitespace = XML.prettyPrinting = false; + + let res =