Netflix intro skip

This script automatically skips intro on Netflix. And it's jQuery free!

Versión del día 28/02/2022. Echa un vistazo a la versión más reciente.

// ==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.0.1
// @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')
        .flatMap(m => Array.from(m.addedNodes))
        .flatMap(n => Array.from(n.childNodes))
        .filter(n => n.tagName === 'BUTTON')
        .filter(e => e.getAttribute('data-uia') === 'player-skip-intro')
        .forEach(e => e.click());

    // Start MutationObserver
    new MutationObserver(observerCallback)
        .observe(observerTarget, {
            childList: true,
            subtree: true
        });
})();