Code styling

pull/2/head
Deathamns 10 years ago committed by gorhill
parent 37a9f4d762
commit ff7c9e96ae

@ -26,12 +26,7 @@
/******************************************************************************/
let bgProcess;
/******************************************************************************/
function startup(data, reason) {
bgProcess = function(e) {
let bgProcess = function(e) {
if ( e ) {
this.removeEventListener('DOMContentLoaded', bgProcess);
}
@ -46,7 +41,14 @@ function startup(data, reason) {
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']
.getService(Components.interfaces.nsIWindowWatcher);
@ -57,17 +59,15 @@ function startup(data, reason) {
}
});
}
else {
bgProcess();
}
}
/******************************************************************************/
function shutdown(data, reason) {
if (reason !== APP_SHUTDOWN) {
bgProcess.parentNode.removeChild(bgProcess);
if ( reason === APP_SHUTDOWN ) {
return;
}
bgProcess.parentNode.removeChild(bgProcess);
}
/******************************************************************************/

Loading…
Cancel
Save