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

Fix about:pentadactyl = about:undefined in Gecko<2.0.

This commit is contained in:
Kris Maglione
2010-09-28 14:04:11 -04:00
parent 85a5e15fc6
commit afc2eac676
15 changed files with 70 additions and 126 deletions

View File

@@ -20,6 +20,8 @@ const NS_BINDING_ABORTED = 0x804b0002;
const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
const prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService)
.getBranch("extensions.dactyl.");
let channel = Components.classesByID["{61ba33c0-3031-11d3-8cd0-0060b0fc14a3}"]
.getService(Ci.nsIProtocolHandler)
@@ -88,7 +90,6 @@ ChromeData.prototype = {
};
function Dactyl() {
Dactyl.prototype.__proto__ = Cc["@dactyl.googlecode.com/base/dactyl"].getService().wrappedJSObject;
this.wrappedJSObject = this;
this.HELP_TAGS = {};
@@ -111,6 +112,11 @@ Dactyl.prototype = {
}
},
appName: prefs.getComplexValue("appName", Ci.nsISupportsString).data,
name: prefs.getComplexValue("name", Ci.nsISupportsString).data,
idName: prefs.getComplexValue("idName", Ci.nsISupportsString).data,
host: prefs.getComplexValue("host", Ci.nsISupportsString).data,
init: function (obj) {
for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) {
this[prop] = this[prop].constructor();
@@ -156,19 +162,15 @@ Dactyl.prototype = {
return fakeChannel(uri);
}
};
try {
Dactyl.prototype.__proto__ = Cc["@dactyl.googlecode.com/base/dactyl"].getService().wrappedJSObject;
}
catch (e) {}
function AboutHandler() {}
AboutHandler.prototype = {
classDescription: "About " + Dactyl.prototype.name + " Page",
classDescription: "About " + Dactyl.prototype.appName + " Page",
classID: Components.ID("81495d80-89ee-4c36-a88d-ea7c4e5ac63f"),
contractID: "@mozilla.org/network/protocol/about;1?what=" + Dactyl.prototype.appName,
contractID: "@mozilla.org/network/protocol/about;1?what=" + Dactyl.prototype.name,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),