YouTube Localhost Ad-Free Player

Play YouTube videos ad-free using an iframe embed served from localhost

目前為 2025-11-29 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
CyrilSLi
評價
0 0 0
版本
1.3
建立日期
2025-08-24
更新日期
2025-11-29
尺寸
10.1 KB
授權條款
MIT
腳本執行於

yt-localhost-iframe

Play YouTube videos ad-free using an iframe embed served from localhost

Greasy Fork   GitHub

Installation

  1. Install script.user.js with a userscript manager or from Greasy Fork
  2. Serve index.html on localhost:8823 using a local web server, some options are as follows:
  3. run python -m http.server 8823 in the project directory after cloning the repository
  4. run the convenience script yt-iframe.py (ensure the setproctitle Python package is installed), this will start a process with the name yt-iframe so it can be easily found and killed if needed

Note: The server must be running whenever you use YouTube with this script enabled.

For Chromium-based browsers, set the flag local-network-access-check to Disabled as otherwise the browser will not allow a local iframe inside public sites including YouTube.

Usage

This script is designed to be minimally invasive, overlaying the localhost iframe on top of the original player.

Use YouTube as normal with the exception of playlists. Switch videos by clicking the playlist icon inside the player instead of the YouTube playlist sidebar to avoid reloading the page.

Known Issues

  • Playlists:

    • Not all videos in a playlist may load into the embed player. If this happens, try refreshing the page.
    • The playlist may reset to the first video when entering and exiting miniplayer mode.
    • This issue may be partially mitigated by entering and exiting miniplayer mode on the first video before you start watching the playlist.
  • Video Info:

    • The video title may be empty when switching videos with the miniplayer active. Refresh the page to fix.