Netflix intro skip

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

As of 02.03.2022. See апошняя версія.

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.1
// @license      MIT
// @run-at       document-end
// @include      https://www.netflix.com/*
// ==/UserScript==
(function () {
    'use strict';

    // Declare observer callback
    const observerCallback = mutations => mutations
        .filter(m => m.type === 'childList' && 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(document.body, {
            childList: true,
            subtree: true
        });
})();