mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
Replace window.onload assignment with 'load' event listener
Each window.onload assignment overwrites the previous one.
This commit is contained in:
@@ -222,7 +222,10 @@ chrome.runtime.sendMessage({}, function(response) {
|
|||||||
if (blacklisted)
|
if (blacklisted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
window.onload = () => initializeNow(document);
|
window.addEventListener('load', function () {
|
||||||
|
initializeNow(document);
|
||||||
|
}, false);
|
||||||
|
|
||||||
if (document) {
|
if (document) {
|
||||||
if (document.readyState === "complete") {
|
if (document.readyState === "complete") {
|
||||||
initializeNow(document);
|
initializeNow(document);
|
||||||
|
Reference in New Issue
Block a user