mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
@@ -365,17 +365,17 @@ function getShadow(parent) {
|
|||||||
if (parent.firstElementChild) {
|
if (parent.firstElementChild) {
|
||||||
var child = parent.firstElementChild;
|
var child = parent.firstElementChild;
|
||||||
do {
|
do {
|
||||||
result = result.concat(child);
|
result.push(child);
|
||||||
getChild(child);
|
getChild(child);
|
||||||
if (child.shadowRoot) {
|
if (child.shadowRoot) {
|
||||||
result = result.concat(getShadow(child.shadowRoot));
|
result.push(getShadow(child.shadowRoot));
|
||||||
}
|
}
|
||||||
child = child.nextElementSibling;
|
child = child.nextElementSibling;
|
||||||
} while (child);
|
} while (child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getChild(parent);
|
getChild(parent);
|
||||||
return result;
|
return result.flat(Infinity);
|
||||||
}
|
}
|
||||||
function getController(id) {
|
function getController(id) {
|
||||||
return getShadow(document.body).filter(x => {
|
return getShadow(document.body).filter(x => {
|
||||||
@@ -502,7 +502,8 @@ function initializeNow(document) {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "attributes":
|
case "attributes":
|
||||||
if (mutation.target.attributes["aria-hidden"].value == "false") {
|
if (mutation.target.attributes["aria-hidden"] &&
|
||||||
|
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) {
|
if (node) {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Video Speed Controller",
|
"name": "Video Speed Controller",
|
||||||
"short_name": "videospeed",
|
"short_name": "videospeed",
|
||||||
"version": "0.5.9",
|
"version": "0.6.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"description": "Speed up, slow down, advance and rewind any HTML5 video with quick shortcuts.",
|
"description": "Speed up, slow down, advance and rewind any HTML5 video with quick shortcuts.",
|
||||||
"homepage_url": "https://github.com/igrigorik/videospeed",
|
"homepage_url": "https://github.com/igrigorik/videospeed",
|
||||||
|
Reference in New Issue
Block a user