remove dep function, typo
This commit is contained in:
16
script.js
16
script.js
@@ -23,6 +23,7 @@ let currentLocation = window.top.location.href;
|
|||||||
let movieList = [], currentMovieIndex = 0;
|
let movieList = [], currentMovieIndex = 0;
|
||||||
let previousMovies = [];
|
let previousMovies = [];
|
||||||
let forwardMovies = [];
|
let forwardMovies = [];
|
||||||
|
let monitorOutroInterval = null; // Global interval variable to monitor the outro segment of the trailer
|
||||||
|
|
||||||
if (setMuted) {
|
if (setMuted) {
|
||||||
const slidesContainer = document.getElementById('slides-container');
|
const slidesContainer = document.getElementById('slides-container');
|
||||||
@@ -42,20 +43,6 @@ if (setMuted) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get SponsorBlock-Data for the outro segment of the trailer
|
// 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) => {
|
const fetchSponsorBlockOutro = async (videoId) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`https://sponsor.ajay.app/api/skipSegments?videoID=${videoId}&category=outro`);
|
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
|
// Monitor the video player for the outro segment
|
||||||
let monitorOutroInterval = null; // Global interval variable
|
|
||||||
function monitorOutro(player, outroSegment) {
|
function monitorOutro(player, outroSegment) {
|
||||||
if (monitorOutroInterval) { // Clear the interval if it's already running
|
if (monitorOutroInterval) { // Clear the interval if it's already running
|
||||||
clearInterval(monitorOutroInterval);
|
clearInterval(monitorOutroInterval);
|
||||||
|
Reference in New Issue
Block a user