🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Auto PiP on Tab Switch

Auto Picture-in-Picture when switching tabs (only if video is playing)

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

작성자
FerNikoMF
일일 설치 수
1
총 설치 수
102
평점
1 0 0
버전
1.2
생성일
2025-01-30
갱신일
2025-06-16
크기
2KB
라이선스
MIT
적용 사이트
모든 사이트

Auto PiP on Tab Switch

This script automatically enables Picture-in-Picture (PiP) mode for videos when you switch to another tab. When you return to the tab with the video, PiP is disabled.

It works on most video platforms like YouTube, Twitch, VK, Twitter, and other websites that use the <video> element. This allows you to continue watching videos in a small window that stays on top of other apps or tabs, without interrupting your viewing experience.

How it works:

  • The script listens for visibility changes on the tab (when you switch to another tab or return to the video tab).
  • When the tab becomes hidden (you switch away), the script triggers PiP for the first available video on the page.
  • When you come back to the tab with the video, PiP is automatically turned off.

Installation Instructions:

  1. Install Tampermonkey (or Greasemonkey for Firefox).
  2. The script will start working automatically on all supported websites.

Supported Websites:

  • YouTube
  • Twitch
  • Twitter
  • VK
  • And any other site using the <video> element.

Requirements:

  • Tampermonkey or Greasemonkey extension version 4.0 or later.
  • Works on Chrome, Edge, Firefox, and other browsers supporting user scripts.

Known Issues:

  • Some websites might block PiP on their video players, in which case the script may not work.
  • Make sure you're using the latest version of your browser for optimal performance.