Created
August 16, 2026 22:02
-
-
Save luckycdev/acb67c68290577719abfaaa48e464d9e to your computer and use it in GitHub Desktop.
Crunchyroll Unlock PiP Userscript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Crunchyroll Unlock PiP | |
| // @namespace https://github.com/luckycdev | |
| // @version 1.0 | |
| // @description Unlocks native browser Picture-in-Picture on Crunchyroll | |
| // @author luckycdev | |
| // @match https://www.crunchyroll.com/* | |
| // @match https://static.crunchyroll.com/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| function unlockVideoPip() { | |
| const videos = document.querySelectorAll('video'); | |
| videos.forEach(video => { | |
| if (video.hasAttribute('disablepictureinpicture')) { | |
| video.removeAttribute('disablepictureinpicture'); | |
| } | |
| video.disablePictureInPicture = false; | |
| }); | |
| } | |
| // Watch for dynamic video player loads/updates | |
| const observer = new MutationObserver(unlockVideoPip); | |
| observer.observe(document.documentElement, { | |
| childList: true, | |
| subtree: true | |
| }); | |
| // Initial run | |
| unlockVideoPip(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment