YouTube Ad Skipper

Simple ad skip button for YouTube

目前为 2025-01-25 提交的版本。查看 最新版本

作者
anas k
评分
0 0 0
版本
1.5
创建于
2025-01-24
更新于
2025-01-25
大小
2.5 KB
许可证
MIT
适用于

How It Works

The script injects a floating button (>) that appears over YouTube videos. When clicked:

  1. Finds the current video player and timestamp

    const player = document.querySelector('video');
    const exactTime = player.currentTime;
    
  2. Extracts the YouTube video ID from the URL

    const videoId = new URLSearchParams(window.location.search).get('v');
    
  3. Reloads the video at the exact same timestamp

    const moviePlayer = document.getElementById('movie_player');
    if (moviePlayer) {
       moviePlayer.loadVideoById(videoId, exactTime);
    }
    
  4. Effectively bypasses ads

    • Forces a clean video reload while maintaining playback position
    • Skips ads without disrupting the viewing experience