mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 09:42:28 +01:00
Move the ACR disabler to common/, pass it an add-on ID.
--HG-- rename : pentadactyl/content/disable-acr.jsm => common/content/disable-acr.jsm
This commit is contained in:
12
common/bootstrap.js
vendored
12
common/bootstrap.js
vendored
@@ -169,9 +169,11 @@ function init() {
|
||||
}
|
||||
|
||||
try {
|
||||
module("resource://dactyl-local-content/disable-acr.jsm").init();
|
||||
module("resource://dactyl-content/disable-acr.jsm").init(addon.id);
|
||||
}
|
||||
catch (e) {
|
||||
reportError(e);
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
if (JSMLoader && JSMLoader.bump != 3) // Temporary hack
|
||||
Services.scriptloader.loadSubScript("resource://dactyl" + suffix + "/bootstrap.jsm",
|
||||
@@ -197,9 +199,11 @@ function shutdown(data, reason) {
|
||||
dump("dactyl: bootstrap: shutdown " + reasonToString(reason) + "\n");
|
||||
if (reason != APP_SHUTDOWN) {
|
||||
try {
|
||||
module("resource://dactyl-local-content/disable-acr.jsm").cleanup();
|
||||
module("resource://dactyl-content/disable-acr.jsm").init(addon.id);
|
||||
}
|
||||
catch (e) {
|
||||
reportError(e);
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
if ([ADDON_UPGRADE, ADDON_DOWNGRADE, ADDON_UNINSTALL].indexOf(reason) >= 0)
|
||||
Services.obs.notifyObservers(null, "dactyl-purge", null);
|
||||
|
||||
Reference in New Issue
Block a user