PIP Enhancer - Picture-in-Picture Automation Script
📌 Overview
PIP Enhancer is a Tampermonkey userscript that automatically enables Picture-in-Picture (PIP) mode when a video is playing, ensuring a seamless background watching experience. It features custom settings, animation effects, multi-language support, and an interactive control panel.
🔥 Features
✅ Automatic PIP Activation - Triggers PIP mode when switching tabs or losing window focus.
✅ PIP Exit Handling - Automatically exits PIP when the page regains focus.
✅ Configurable Trigger Ratio - Adjust video screen size percentage required for activation.
✅ Smooth Animations - Enables scale and opacity transitions when entering PIP.
✅ Multi-language Support - Supports English (en
), Chinese (zh
), and Spanish (es
).
✅ Customizable Notifications - Toggle notification alerts for entry/exit events.
✅ Tampermonkey Control Panel - Easily toggle animations, notifications, and adjust settings.
✅ Optimized for Performance - Works efficiently without redundant triggers.
🎥 How It Works
- When a video is playing, has sound, and occupies more than 30% of the screen, PIP is triggered.
- Switching tabs or minimizing the browser will activate PIP mode.
- Returning to the tab will exit PIP mode automatically.
- Users can configure options via Tampermonkey’s menu.
⚙️ Installation
- Install Tampermonkey extension on your browser.
- Add the PIP Enhancer userscript.
- Enjoy seamless Picture-in-Picture automation!
🔧 Configuration Options
Access these via Tampermonkey Menu > PIP Enhancer Settings:
- Enable/Disable Animations (Smooth PIP transitions).
- Enable/Disable Notifications (Control alerts for PIP events).
- Adjust PIP Trigger Ratio (Default: 30% video area).
🌎 Supported Websites
✔ YouTube
✔ Netflix
✔ Bilibili
✔ Twitch
✔ Vimeo
✔ All HTML5 video-supported sites
🖼 Visual Enhancements
- Uses
pip-it-picture-in-picture
logo in notifications.
- Smooth scaling & opacity animations when activating PIP.
📜 License
This project is licensed under the GPL-3.0 license.
📩 Feedback & Contributions
Feel free to suggest improvements or contribute to future enhancements!