Plex Auto Skip Intro (Optimized)

Auto skip intro in Plex

질문, 리뷰하거나, 이 스크립트를 신고하세요.
  1. // ==UserScript==
  2. // @name Plex Auto Skip Intro (Optimized)
  3. // @description:en Automate the Skip Intro of your Series reproduced in plex so you can watch them without interruptions
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.2
  6. // @description Auto skip intro in Plex
  7. // @author CodeRED
  8. // @description:es Automatiza el Saltar Intro de tus Series reproducidas en plex para asi poderlas ver sin interrupciones
  9. // @match https://app.plex.tv/desktop*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const checkForSkipIntroButton = () => {
  17. const skipIntroButton = document.querySelector('.AudioVideoFullPlayer-overlayButton-D2xSex');
  18. if (skipIntroButton) {
  19. skipIntroButton.click();
  20. console.log('Opening omitido');
  21. }
  22. };
  23.  
  24. const observer = new MutationObserver((mutationsList) => {
  25. for (const mutation of mutationsList) {
  26. if (mutation.type === 'childList') {
  27. checkForSkipIntroButton();
  28. }
  29. }
  30. });
  31.  
  32. const targetNode = document.querySelector('body');
  33. const config = { attributes: false, childList: true, subtree: true };
  34. observer.observe(targetNode, config);
  35.  
  36. })();