mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 02:22:26 +01:00
"use strict"
This commit is contained in:
12
common/bootstrap.js
vendored
12
common/bootstrap.js
vendored
@@ -5,6 +5,7 @@
|
|||||||
//
|
//
|
||||||
// See https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions
|
// See https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions
|
||||||
// for details.
|
// for details.
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const global = this;
|
const global = this;
|
||||||
|
|
||||||
@@ -16,9 +17,9 @@ const DEBUG = true;
|
|||||||
|
|
||||||
__defineGetter__("BOOTSTRAP", function () "resource://" + moduleName + "/bootstrap.jsm");
|
__defineGetter__("BOOTSTRAP", function () "resource://" + moduleName + "/bootstrap.jsm");
|
||||||
|
|
||||||
const { AddonManager } = module("resource://gre/modules/AddonManager.jsm");
|
var { AddonManager } = module("resource://gre/modules/AddonManager.jsm");
|
||||||
const { XPCOMUtils } = module("resource://gre/modules/XPCOMUtils.jsm");
|
var { XPCOMUtils } = module("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
const { Services } = module("resource://gre/modules/Services.jsm");
|
var { Services } = module("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
const resourceProto = Services.io.getProtocolHandler("resource")
|
const resourceProto = Services.io.getProtocolHandler("resource")
|
||||||
.QueryInterface(Ci.nsIResProtocolHandler);
|
.QueryInterface(Ci.nsIResProtocolHandler);
|
||||||
@@ -262,8 +263,7 @@ function init() {
|
|||||||
|
|
||||||
Services.obs.notifyObservers(null, "dactyl-rehash", null);
|
Services.obs.notifyObservers(null, "dactyl-rehash", null);
|
||||||
|
|
||||||
JSMLoader.name = name;
|
JSMLoader.bootstrap = global;
|
||||||
JSMLoader.bootstrap = this;
|
|
||||||
|
|
||||||
JSMLoader.load("config", global);
|
JSMLoader.load("config", global);
|
||||||
JSMLoader.load("main", global);
|
JSMLoader.load("main", global);
|
||||||
@@ -300,8 +300,8 @@ function init() {
|
|||||||
* Performs necessary migrations after a version change.
|
* Performs necessary migrations after a version change.
|
||||||
*/
|
*/
|
||||||
function updateVersion() {
|
function updateVersion() {
|
||||||
|
function isDev(ver) /^hg|pre$/.test(ver);
|
||||||
try {
|
try {
|
||||||
function isDev(ver) /^hg|pre$/.test(ver);
|
|
||||||
if (typeof require === "undefined" || addon === addonData)
|
if (typeof require === "undefined" || addon === addonData)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user