mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
place controller inside scrim div & better filter to find old controller
This commit is contained in:
@@ -272,7 +272,7 @@
|
|||||||
break;
|
break;
|
||||||
case (location.hostname == 'tv.apple.com'):
|
case (location.hostname == 'tv.apple.com'):
|
||||||
// insert after parent for correct stacking context
|
// insert after parent for correct stacking context
|
||||||
this.parent.getRootNode().host.prepend(fragment);
|
this.parent.getRootNode().querySelector('.scrim').prepend(fragment);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Note: when triggered via a MutationRecord, it's possible that the
|
// Note: when triggered via a MutationRecord, it's possible that the
|
||||||
@@ -456,7 +456,7 @@
|
|||||||
if ((mutation.target.tagName == 'APPLE-TV-PLUS-PLAYER') && (mutation.target.attributes['aria-hidden'].value == "false")) {
|
if ((mutation.target.tagName == 'APPLE-TV-PLUS-PLAYER') && (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]
|
||||||
var oldController = flattenedNodes.filter(x => x.className == 'vsc-controller')[0]
|
var oldController = flattenedNodes.filter(x => x.classList.contains('vsc-controller'))[0]
|
||||||
if (oldController) {
|
if (oldController) {
|
||||||
oldController.remove()
|
oldController.remove()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user