Universal Picture-in-Picture

PiP button on video hover + keyboard shortcut (Alt+P)

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

作者
TropicalFrog3
今日安裝
0
安裝總數
4
評價
0 0 0
版本
1.0.0
建立日期
2025-12-28
更新日期
2025-12-28
尺寸
11.9 KB
授權條款
MIT
腳本執行於
所有網站

Universal Picture-in-Picture

A Picture-in-Picture (PiP) button that appears on any web video.

Features

  • Floating button: Appears in the top-right corner of the video on hover
  • Keyboard shortcut: Alt+P to quickly toggle PiP
  • Smart detection: Automatically filters out ads
  • Customizable position: Drag and drop the button wherever you want
  • Remembered position: Your preferred position is saved between sessions
  • YouTube compatible: Works on YouTube and all other video sites
  • Auto-hide: Button disappears after 3 seconds

Usage

Floating button

  1. Hover over a video with your mouse
  2. A PiP button appears in the top-right corner
  3. Click it to activate Picture-in-Picture mode

Keyboard shortcut

  • Press Alt+P anytime to toggle PiP on the best detected video

Customize position

  • Move: Click and drag the button to your preferred position
  • Reset: Right-click the button to return to default position

Compatibility

Tested and working on:

  • YouTube
  • Twitch
  • Vimeo
  • Netflix
  • And most sites with HTML5 video players

Technical notes

  • The script uses native DOM methods (no innerHTML) to be compatible with YouTube's Trusted Types security policy
  • Button position is stored as a percentage to adapt to different video sizes
  • Videos that are too small (< 100px) or identified as ads are automatically ignored