Netflix Skip Intro Automation

This script automatically clicks the "Skip Intro" button for Netflix streams as soon as it appears.

  1. // ==UserScript==
  2. // @name Netflix Skip Intro Automation
  3. // @namespace https://www.netflix.com
  4. // @version 1.0
  5. // @description This script automatically clicks the "Skip Intro" button for Netflix streams as soon as it appears.
  6. // @license MIT
  7. // @match https://www.netflix.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function autoClickSkipIntroButton() {
  15. const button = document.querySelector('[data-uia="player-skip-intro"]');
  16. if (button) {
  17. button.click();
  18. }
  19. }
  20.  
  21. function handleMutation(mutationsList, observer) {
  22. autoClickSkipIntroButton();
  23. }
  24.  
  25. const observer = new MutationObserver(handleMutation);
  26. observer.observe(document.body, { childList: true, subtree: true });
  27.  
  28. // Start observing as soon as the page loads
  29. window.addEventListener('load', () => {
  30. autoClickSkipIntroButton();
  31. });
  32. })();