Index: lib/child/cssProperties.js |
=================================================================== |
--- a/lib/child/cssProperties.js |
+++ b/lib/child/cssProperties.js |
@@ -57,17 +57,17 @@ |
let onContentWindow = (subject, topic, data) => |
{ |
if (!(subject instanceof Ci.nsIDOMWindow)) |
return; |
let onReady = event => |
{ |
- subject.removeEventListener("DOMContentLoaded", onReady); |
+ subject.removeEventListener("load", onReady); |
let handler = new scope.CSSPropertyFilters(subject, selectors => |
{ |
if (selectors.length == 0) |
return; |
addUserCSS(subject, selectors.map( |
selector => selector + "{display: none !important;}" |
).join("\n")); |
@@ -76,17 +76,17 @@ |
// HACK: The content script just calls ext.backgroundPage.sendMessage |
// without indicating which window this is about. We'll store the window |
// here because we know that messaging happens synchronously. |
senderWindow = subject; |
handler.load(() => handler.apply()); |
senderWindow = null; |
}; |
- subject.addEventListener("DOMContentLoaded", onReady); |
+ subject.addEventListener("load", onReady); |
}; |
Services.obs.addObserver(onContentWindow, "content-document-global-created", |
false); |
onShutdown.add(() => |
{ |
Services.obs.removeObserver(onContentWindow, |
"content-document-global-created"); |