From 9d0970fb3edeb60debc2030c24de134ae1928e4a Mon Sep 17 00:00:00 2001 From: Bianca van Schaik Date: Wed, 29 May 2019 19:32:29 +0200 Subject: [PATCH] Do not call window.onload function from load event listener This causes the onload function to run twice, which breaks some websites. Fixes #420 --- src/content_script.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/content_script.js b/src/content_script.js index 9f66686f..f6dc743f 100644 --- a/src/content_script.js +++ b/src/content_script.js @@ -546,12 +546,7 @@ async function CheckIfURLShouldBeBlocked() { // Cross-browser implementation of element.addEventListener() function addPassiveWindowOnloadListener() { - const activeOnloadFunction = window.onload; window.addEventListener("load", function() { - // window.onload = function () { - if (typeof activeOnloadFunction === "function") { - activeOnloadFunction(); - } CheckIfURLShouldBeBlocked(); }, false); }