Skip to content

Commit

Permalink
Merge pull request #88 from teldosas/patch-1
Browse files Browse the repository at this point in the history
Replace onLoad  with addEventListener
  • Loading branch information
codebicycle committed Apr 26, 2020
2 parents 3a289e3 + 732e07e commit 3975b74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inject.js
Expand Up @@ -413,9 +413,9 @@ function initializeWhenReady(document) {
if (isBlacklisted()) {
return;
}
window.onload = () => {
window.addEventListener('load', () => {
initializeNow(window.document);
};
});
if (document) {
if (document.readyState === "complete") {
initializeNow(document);
Expand Down

0 comments on commit 3975b74

Please sign in to comment.