mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-06 07:15:46 +01:00
Fix config.version on FF36. Closes issue #306.
This commit is contained in:
@@ -169,8 +169,12 @@ function endModule() {
|
|||||||
|
|
||||||
function require(obj, name, from) {
|
function require(obj, name, from) {
|
||||||
try {
|
try {
|
||||||
|
if (arguments.length === 1)
|
||||||
|
[obj, name] = [{}, obj];
|
||||||
|
|
||||||
defineModule.loadLog.push((from || "require") + ": loading " + name + " into " + obj.NAME);
|
defineModule.loadLog.push((from || "require") + ": loading " + name + " into " + obj.NAME);
|
||||||
JSMLoader.load(name + ".jsm", obj);
|
JSMLoader.load(name + ".jsm", obj);
|
||||||
|
return obj;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");
|
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
let global = this;
|
||||||
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
||||||
defineModule("config", {
|
defineModule("config", {
|
||||||
exports: ["ConfigBase", "Config", "config"],
|
exports: ["ConfigBase", "Config", "config"],
|
||||||
@@ -54,7 +55,7 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
addon: Class.memoize(function () {
|
addon: Class.memoize(function () {
|
||||||
let addon = services.fuel.storage.get("dactyl.bootstrap", {}).addon;
|
let addon = services.fuel.storage.get("dactyl.bootstrap", {}).addon;
|
||||||
if (!addon)
|
if (!addon)
|
||||||
addon = AddonManager.getAddonByID(this.addonID);
|
addon = require("addons").AddonManager.getAddonByID(this.addonID);
|
||||||
return addon;
|
return addon;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user