Crunchyroll Picture-in-Picture (page + iframe)

Enables PiP on Crunchyroll player by fixing iframe and video element restrictions.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
cyberaguiar
今日安裝
0
安裝總數
6
評價
1 0 0
版本
1.3
建立日期
2025-09-26
更新日期
2025-09-26
尺寸
3.6 KB
授權條款
MIT
腳本執行於

📖 Description

This userscript enables Picture-in-Picture (PiP) mode for Crunchyroll’s HTML5 player. By default, Crunchyroll blocks PiP by:

Wrapping the video element inside a restricted iframe.

Applying the attribute disablepictureinpicture to the video element.

This script solves both issues:

On the main Crunchyroll page, it updates the iframe’s allow attribute to include picture-in-picture.

Inside the iframe player, it automatically removes (and prevents re-adding) the disablepictureinpicture attribute from the video element.

As a result, you can use the standard PiP feature (or shortcut) to pop the video out while browsing.

🛠️ Features

Works on Crunchyroll main site and its embedded player iframe (static.crunchyroll.com/vilos).

Automatically patches the iframe permissions.

Continuously watches for player reloads or replaced elements.

Removes disablepictureinpicture as soon as it appears.

Optional shortcut: Ctrl + Alt + P forces PiP mode immediately.

📋 Installation

Install a userscript manager such as Tampermonkey (Chrome/Edge/Opera) or Violentmonkey (Firefox).

Click “Install” on this script page.

Ensure that the script is enabled and is set to run in all frames (iframes included).

Visit https://www.crunchyroll.com and play any video.

🎮 Usage

Simply start playback. The script will silently enable PiP support.

Right-click on the video and choose “Picture in Picture” (or use your browser’s toolbar shortcut).

Or press Ctrl + Alt + P to enter PiP instantly.