1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 08:34:12 +01:00

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-12-16 21:35:20 -08:00
parent 3e1911476b
commit d8515c1548
2 changed files with 8 additions and 5 deletions

View File

@@ -16,7 +16,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
init: function () {
window.dactyl = this;
// cheap attempt at compatibility
let prop = { get: deprecated("dactyl", function liberator() dactyl) };
let prop = { get: deprecated("dactyl", function liberator() dactyl),
configurable: true };
Object.defineProperty(window, "liberator", prop);
Object.defineProperty(modules, "liberator", prop);
this.commands = {};
@@ -108,7 +109,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
signals: {
"io.source": function ioSource(context, file, modTime) {
if (context.INFO)
if (contexts.getDocs(context))
help.flush("help/plugins.xml", modTime);
}
},
@@ -1243,8 +1244,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (attr in elem[1])
info[attr] = elem[1][attr];
}
body.push(["h2", { xmlns: "dactyl", tag: info.name + '-plugin' },
String(info.summary)]);
body.push(["h2", { xmlns: "dactyl", tag: info[1].name + '-plugin' },
String(info[1].summary)]);
body.push(info);
}
}

View File

@@ -486,7 +486,9 @@ var Contexts = Module("contexts", {
let info = "INFO" in context && Cu.evalInSandbox("this.INFO instanceof XML ? INFO.toXMLString() : this.INFO", context);
return /^</.test(info) ? XML(info) : info;
}
if (typeof context.INFO == "xml" || DOM.isJSONXML(context.INFO))
if (DOM.isJSONXML(context.INFO))
return context.INFO;
if (typeof context.INFO == "xml" && config.haveGecko(null, "14.*"))
return context.INFO;
}
catch (e) {}