Created
February 16, 2026 20:20
-
-
Save realazizk/19eebe97edd9bb01db5038e6d51a4389 to your computer and use it in GitHub Desktop.
crunchyroll enable Picture in picture
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 Enable Picture-in-Picture | |
| // @match *://*/* | |
| // @run-at document-start | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| function enablePiP() { | |
| document.querySelectorAll('video').forEach(video => { | |
| video.removeAttribute('disablepictureinpicture'); | |
| video.disablePictureInPicture = false; | |
| }); | |
| } | |
| enablePiP(); | |
| const observer = new MutationObserver(enablePiP); | |
| observer.observe(document.body || document.documentElement, { | |
| childList: true, | |
| subtree: true, | |
| attributes: true, | |
| attributeFilter: ['disablepictureinpicture'] | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment