mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-07-05 22:41:04 +12:00
Code styling
This commit is contained in:
parent
37a9f4d762
commit
ff7c9e96ae
26
platform/firefox/bootstrap.js
vendored
26
platform/firefox/bootstrap.js
vendored
|
@ -26,12 +26,7 @@
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
let bgProcess;
|
let bgProcess = function(e) {
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
function startup(data, reason) {
|
|
||||||
bgProcess = function(e) {
|
|
||||||
if ( e ) {
|
if ( e ) {
|
||||||
this.removeEventListener('DOMContentLoaded', bgProcess);
|
this.removeEventListener('DOMContentLoaded', bgProcess);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +41,14 @@ function startup(data, reason) {
|
||||||
bgProcess.setAttribute('src', 'chrome://ublock/content/background.html');
|
bgProcess.setAttribute('src', 'chrome://ublock/content/background.html');
|
||||||
};
|
};
|
||||||
|
|
||||||
if (reason === APP_STARTUP) {
|
/******************************************************************************/
|
||||||
|
|
||||||
|
function startup(data, reason) {
|
||||||
|
if ( reason !== APP_STARTUP ) {
|
||||||
|
bgProcess();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let ww = Components.classes['@mozilla.org/embedcomp/window-watcher;1']
|
let ww = Components.classes['@mozilla.org/embedcomp/window-watcher;1']
|
||||||
.getService(Components.interfaces.nsIWindowWatcher);
|
.getService(Components.interfaces.nsIWindowWatcher);
|
||||||
|
|
||||||
|
@ -57,17 +59,15 @@ function startup(data, reason) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
bgProcess();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
function shutdown(data, reason) {
|
function shutdown(data, reason) {
|
||||||
if (reason !== APP_SHUTDOWN) {
|
if ( reason === APP_SHUTDOWN ) {
|
||||||
bgProcess.parentNode.removeChild(bgProcess);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bgProcess.parentNode.removeChild(bgProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue