mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
minor code review
This commit is contained in:
parent
b190f0b183
commit
04d11d25b6
10
platform/firefox/bootstrap.js
vendored
10
platform/firefox/bootstrap.js
vendored
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
const {classes: Cc} = Components;
|
const {classes: Cc, interfaces: Ci} = Components;
|
||||||
|
|
||||||
// Accessing the context of the background page:
|
// Accessing the context of the background page:
|
||||||
// var win = Services.appShell.hiddenDOMWindow.document.querySelector('iframe[src*=ublock0]').contentWindow;
|
// var win = Services.appShell.hiddenDOMWindow.document.querySelector('iframe[src*=ublock0]').contentWindow;
|
||||||
@ -37,7 +37,7 @@ const hostName = 'ublock0';
|
|||||||
const restartListener = {
|
const restartListener = {
|
||||||
get messageManager() {
|
get messageManager() {
|
||||||
return Cc['@mozilla.org/parentprocessmessagemanager;1']
|
return Cc['@mozilla.org/parentprocessmessagemanager;1']
|
||||||
.getService(Components.interfaces.nsIMessageListenerManager);
|
.getService(Ci.nsIMessageListenerManager);
|
||||||
},
|
},
|
||||||
|
|
||||||
receiveMessage: function() {
|
receiveMessage: function() {
|
||||||
@ -54,7 +54,7 @@ function startup(data, reason) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let appShell = Cc['@mozilla.org/appshell/appShellService;1']
|
let appShell = Cc['@mozilla.org/appshell/appShellService;1']
|
||||||
.getService(Components.interfaces.nsIAppShellService);
|
.getService(Ci.nsIAppShellService);
|
||||||
|
|
||||||
let onReady = function(e) {
|
let onReady = function(e) {
|
||||||
if ( e ) {
|
if ( e ) {
|
||||||
@ -99,7 +99,7 @@ function startup(data, reason) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let ww = Cc['@mozilla.org/embedcomp/window-watcher;1']
|
let ww = Cc['@mozilla.org/embedcomp/window-watcher;1']
|
||||||
.getService(Components.interfaces.nsIWindowWatcher);
|
.getService(Ci.nsIWindowWatcher);
|
||||||
|
|
||||||
ww.registerNotification({
|
ww.registerNotification({
|
||||||
observe: function(win, topic) {
|
observe: function(win, topic) {
|
||||||
@ -144,7 +144,7 @@ function shutdown(data, reason) {
|
|||||||
function install(/*aData, aReason*/) {
|
function install(/*aData, aReason*/) {
|
||||||
// https://bugzil.la/719376
|
// https://bugzil.la/719376
|
||||||
Cc['@mozilla.org/intl/stringbundle;1']
|
Cc['@mozilla.org/intl/stringbundle;1']
|
||||||
.getService(Components.interfaces.nsIStringBundleService)
|
.getService(Ci.nsIStringBundleService)
|
||||||
.flushBundles();
|
.flushBundles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user