Crunchyroll Picture-in-Picture (page + iframe)

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

当前为 2025-09-26 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
cyberaguiar
评分
0 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.