Update skip-intro.js
Add paramount plus and refactor to sub-function
This commit is contained in:
parent
268600e178
commit
7315cb14e2
|
@ -1,7 +1,15 @@
|
|||
javascript: (function () {
|
||||
setInterval(function () {
|
||||
if (document.getElementsByClassName("skip-credits")[0]) {
|
||||
document.getElementsByClassName("skip-credits")[0].children[0].click();
|
||||
javascript: (() => {
|
||||
const getClassAndSkip = (name) => {
|
||||
let skip = document.getElementsByClassName(name).shift();
|
||||
if (skip) {
|
||||
skip.children.shift().click();
|
||||
}
|
||||
};
|
||||
|
||||
setInterval(() => {
|
||||
// netflix
|
||||
getClassAndSkip("skip-credits");
|
||||
// paramount plus
|
||||
getClassAndSkip("skip-button");
|
||||
}, 1e3);
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue