forked from downthemall/downthemall-legacy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbootstrap.js
28 lines (26 loc) · 910 Bytes
/
bootstrap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
function flush() {
const {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {});
Services.obs.notifyObservers(null, "chrome-flush-skin-caches", null);
Services.obs.notifyObservers(null, "chrome-flush-caches", null);
}
function install() {
flush();
}
function uninstall() {}
function startup(data) {
// will unload itself
Components.utils.import("chrome://dta-modules/content/glue.jsm", {});
}
function shutdown(data, reason) {
if (reason === APP_SHUTDOWN) {
// No need to cleanup; stuff will vanish anyway
return;
}
let _g = {};
Components.utils.import("chrome://dta-modules/content/glue.jsm", _g);
_g.unload("shutdown", reason == ADDON_UPGRADE);
}