aboutsummaryrefslogtreecommitdiffstats
path: root/platform/firefox/frameModule.js
diff options
context:
space:
mode:
authorDeathamns <deathamns@gmail.com>2015-03-12 18:20:48 +0100
committerDeathamns <deathamns@gmail.com>2015-03-12 18:20:48 +0100
commit4ad98583579c8b187e7008e70d1ac30fd20404c8 (patch)
tree2a92710402911ac523f6fbed66f05e3f6eed1dce /platform/firefox/frameModule.js
parent48503f700955726ca01ca541e2af444055122675 (diff)
downloaduBlock-4ad98583579c8b187e7008e70d1ac30fd20404c8.zip
uBlock-4ad98583579c8b187e7008e70d1ac30fd20404c8.tar.gz
uBlock-4ad98583579c8b187e7008e70d1ac30fd20404c8.tar.bz2
Firefox: load content-scripts on extension start
Diffstat (limited to 'platform/firefox/frameModule.js')
-rw-r--r--platform/firefox/frameModule.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js
index 9e1c444..f33154c 100644
--- a/platform/firefox/frameModule.js
+++ b/platform/firefox/frameModule.js
@@ -299,7 +299,11 @@ const contentObserver = {
}
};
- doc.addEventListener('DOMContentLoaded', docReady, true);
+ if ( doc.readyState === 'loading') {
+ doc.addEventListener('DOMContentLoaded', docReady, true);
+ } else {
+ docReady({ target: doc, type: 'DOMContentLoaded' });
+ }
}
};