mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 22:42:26 +01:00
[bootstrap] Fix for Gecko<2.
--HG-- branch : bootstrapped
This commit is contained in:
@@ -113,7 +113,7 @@ Dactyl.prototype = {
|
|||||||
contractID: "@mozilla.org/network/protocol;1?name=dactyl",
|
contractID: "@mozilla.org/network/protocol;1?name=dactyl",
|
||||||
classID: Components.ID("{9c8f2530-51c8-4d41-b356-319e0b155c44}"),
|
classID: Components.ID("{9c8f2530-51c8-4d41-b356-319e0b155c44}"),
|
||||||
classDescription: "Dactyl utility protocol",
|
classDescription: "Dactyl utility protocol",
|
||||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler]),
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsIProtocolHandler]),
|
||||||
_xpcom_factory: Factory(Dactyl),
|
_xpcom_factory: Factory(Dactyl),
|
||||||
|
|
||||||
init: function (obj) {
|
init: function (obj) {
|
||||||
@@ -163,6 +163,19 @@ Dactyl.prototype = {
|
|||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e) {}
|
||||||
return fakeChannel(uri);
|
return fakeChannel(uri);
|
||||||
|
},
|
||||||
|
|
||||||
|
// FIXME: Belongs elsewhere
|
||||||
|
_xpcom_categories: [{
|
||||||
|
category: "profile-after-change",
|
||||||
|
entry: "m-dactyl"
|
||||||
|
}],
|
||||||
|
|
||||||
|
observe: function (subject, topic, data) {
|
||||||
|
if (topic === "profile-after-change") {
|
||||||
|
Cu.import("resource://dactyl/base.jsm");
|
||||||
|
require(global, "overlay");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -82,11 +82,17 @@ var Overlay = Module("Overlay", {
|
|||||||
Module.list = [];
|
Module.list = [];
|
||||||
Module.constructors = {};
|
Module.constructors = {};
|
||||||
|
|
||||||
const create = window.Object.create || function (proto) {
|
const BASE = "chrome://dactyl/content/";
|
||||||
let res = window.Object();
|
|
||||||
object.__proto__ = proto;
|
const create = window.Object.create || (function () {
|
||||||
return object;
|
window.__dactyl_eval_string = "(function (proto) ({ __proto__: proto }))";
|
||||||
}
|
services.subscriptLoader.loadSubScript(BASE + "eval.js", window);
|
||||||
|
|
||||||
|
let res = window.__dactyl_eval_result;
|
||||||
|
delete window.__dactyl_eval_string;
|
||||||
|
delete window.__dactyl_eval_result;
|
||||||
|
return res;
|
||||||
|
})();
|
||||||
|
|
||||||
const jsmodules = {};
|
const jsmodules = {};
|
||||||
const modules = update(create(jsmodules), {
|
const modules = update(create(jsmodules), {
|
||||||
@@ -133,8 +139,6 @@ var Overlay = Module("Overlay", {
|
|||||||
modules.modules = modules;
|
modules.modules = modules;
|
||||||
window.dactyl = { modules: modules };
|
window.dactyl = { modules: modules };
|
||||||
|
|
||||||
const BASE = "chrome://dactyl/content/";
|
|
||||||
|
|
||||||
let prefix = [BASE];
|
let prefix = [BASE];
|
||||||
|
|
||||||
modules.load("util");
|
modules.load("util");
|
||||||
|
|||||||
Reference in New Issue
Block a user