diff --git a/inject.js b/inject.js index 81ce855..b6f2486 100644 --- a/inject.js +++ b/inject.js @@ -180,7 +180,10 @@ chrome.extension.sendMessage({}, function(response) { } var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { - forEach.call(mutation.addedNodes, function(node) { + mutation.addedNodes.forEach(node => { + if (typeof node === "function") + return; + checkForVideo(node, node.parentNode || mutation.target); }) });