From 232f55923ff4d7e6b5772a50502567753ffe1500 Mon Sep 17 00:00:00 2001 From: CodeDevMLH Date: Fri, 27 Dec 2024 00:52:32 +0100 Subject: [PATCH] remove dep function, typo --- script.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/script.js b/script.js index 0b661a7..1a9ca9d 100644 --- a/script.js +++ b/script.js @@ -23,6 +23,7 @@ let currentLocation = window.top.location.href; let movieList = [], currentMovieIndex = 0; let previousMovies = []; let forwardMovies = []; +let monitorOutroInterval = null; // Global interval variable to monitor the outro segment of the trailer if (setMuted) { const slidesContainer = document.getElementById('slides-container'); @@ -42,20 +43,6 @@ if (setMuted) { } // Get SponsorBlock-Data for the outro segment of the trailer -//function fetchSponsorBlockOutro(videoId) { -// @deprecated -const fetchSponsorBlockOutroOLD = (videoId) => { - return fetch(`https://sponsor.ajay.app/api/skipSegments?videoID=${videoId}&category=outro`) - .then(response => response.json()) - .then(segments => { - return segments.length > 0 ? segments[0].segment : null; - }) - .catch(error => { - console.error('Error fetching SponsorBlock data:', error); - return null; - }); -}; - const fetchSponsorBlockOutro = async (videoId) => { try { const response = await fetch(`https://sponsor.ajay.app/api/skipSegments?videoID=${videoId}&category=outro`); @@ -72,7 +59,6 @@ const fetchSponsorBlockOutro = async (videoId) => { // Monitor the video player for the outro segment -let monitorOutroInterval = null; // Global interval variable function monitorOutro(player, outroSegment) { if (monitorOutroInterval) { // Clear the interval if it's already running clearInterval(monitorOutroInterval);