Update skip-intro.js

Add paramount plus and refactor to sub-function
This commit is contained in:
zongor 2024-04-28 00:39:43 -04:00
parent 268600e178
commit 7315cb14e2
1 changed files with 12 additions and 4 deletions

View File

@ -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);
})();