From 349279013d9b519b72d60f4e7e4aa3b995dfe1de Mon Sep 17 00:00:00 2001 From: Jonathan Dawson Date: Sat, 9 Nov 2019 14:03:24 -0600 Subject: [PATCH] fix ReferenceError --- inject.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/inject.js b/inject.js index 311c7f1..3f64587 100644 --- a/inject.js +++ b/inject.js @@ -446,11 +446,6 @@ initializeWhenReady(childDocument); }); - //look for video in shadowRoot for apple tv - if (document.querySelector('apple-tv-plus-player')) { - shadowMutations('apple-tv-plus-player', mutationCallback, {childList: true, subtree: true}) - } - // start of ally.js/src/observe/shadow-mutations.js // import nodeArray from '../util/node-array'; // input may be undefined, selector-tring, Node, NodeList, HTMLCollection, array of Nodes @@ -659,6 +654,12 @@ }; } //end of ally.js/src/observe/shadow-mutations.js + + //look for video in shadowRoot for apple tv + if (document.querySelector('apple-tv-plus-player')) { + shadowMutations('apple-tv-plus-player', mutationCallback, {childList: true, subtree: true}) + } + } function runAction(action, document, value, e) {