This script automatically skips intro on Netflix. And it's jQuery free!
La data de
// ==UserScript==
// @name Netflix intro skip
// @namespace https://giuseppe.eletto.org
// @description This script automatically skips intro on Netflix. And it's jQuery free!
// @author Giuseppe Eletto
// @version 1.1.0
// @license MIT
// @run-at document-end
// @include https://www.netflix.com/*
// ==/UserScript==
(function () {
'use strict';
// Declare constants
const observerTarget = window.document.querySelector('body');
const observerCallback = mutations => mutations
.filter(m => m.type === 'childList')
.filter(m => m.addedNodes.length > 0)
.flatMap(m => Array.from(m.addedNodes))
.filter(n => n.nodeType === Node.ELEMENT_NODE)
.map(e => e.querySelector('button[data-uia="player-skip-intro"]'))
.filter(e => e !== null)
.forEach(n => n.click());
// Start MutationObserver
new MutationObserver(observerCallback)
.observe(observerTarget, {
childList: true,
subtree: true
});
})();