mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-22 02:18:45 -04:00
check typeof node in MutationObserver
This commit is contained in:
@@ -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);
|
||||
})
|
||||
});
|
||||
|
Reference in New Issue
Block a user