Simple ad skip button for YouTube with enhanced SPA support
The script injects a floating button (>
) that appears over YouTube videos. When clicked:
Finds the current video player and timestamp
const player = document.querySelector('video');
const exactTime = player.currentTime;
Extracts the YouTube video ID from the URL
const videoId = new URLSearchParams(window.location.search).get('v');
Reloads the video at the exact same timestamp
const moviePlayer = document.getElementById('movie_player');
if (moviePlayer) {
moviePlayer.loadVideoById(videoId, exactTime);
}
Effectively bypasses ads