remove apple-tv tag, but add in a check for video tag.

This commit is contained in:
Jonathan Dawson
2020-01-03 15:34:04 -06:00
parent aa055a5e8f
commit 4871ded5b5

View File

@@ -467,15 +467,17 @@
}); });
break; break;
case 'attributes': case 'attributes':
if ((mutation.target.tagName == 'APPLE-TV-PLUS-PLAYER') && (mutation.target.attributes['aria-hidden'].value == "false")) { if (mutation.target.attributes['aria-hidden'].value == "false") {
var flattenedNodes = getShadow(document.body) var flattenedNodes = getShadow(document.body)
var node = flattenedNodes.filter(x => x.tagName == 'VIDEO')[0] var node = flattenedNodes.filter(x => x.tagName == 'VIDEO')[0]
if (node) {
var oldController = flattenedNodes.filter(x => x.classList.contains('vsc-controller'))[0] var oldController = flattenedNodes.filter(x => x.classList.contains('vsc-controller'))[0]
if (oldController) { if (oldController) {
oldController.remove() oldController.remove()
} }
checkForVideo(node, node.parentNode || mutation.target, true); checkForVideo(node, node.parentNode || mutation.target, true);
} }
}
break; break;
}; };
}); });