mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-22 02:18:45 -04:00
remove apple-tv tag, but add in a check for video tag.
This commit is contained in:
12
inject.js
12
inject.js
@@ -467,14 +467,16 @@
|
|||||||
});
|
});
|
||||||
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]
|
||||||
var oldController = flattenedNodes.filter(x => x.classList.contains('vsc-controller'))[0]
|
if (node) {
|
||||||
if (oldController) {
|
var oldController = flattenedNodes.filter(x => x.classList.contains('vsc-controller'))[0]
|
||||||
oldController.remove()
|
if (oldController) {
|
||||||
|
oldController.remove()
|
||||||
|
}
|
||||||
|
checkForVideo(node, node.parentNode || mutation.target, true);
|
||||||
}
|
}
|
||||||
checkForVideo(node, node.parentNode || mutation.target, true);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user