Netflix intro skip

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

La data de 02-03-2022. Vezi ultima versiune.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

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