Skip to content

Instantly share code, notes, and snippets.

@realazizk
Created February 16, 2026 20:20
Show Gist options
  • Select an option

  • Save realazizk/19eebe97edd9bb01db5038e6d51a4389 to your computer and use it in GitHub Desktop.

Select an option

Save realazizk/19eebe97edd9bb01db5038e6d51a4389 to your computer and use it in GitHub Desktop.
crunchyroll enable Picture in picture
// ==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