Skip to content

Instantly share code, notes, and snippets.

@luckycdev
Created August 16, 2026 22:02
Show Gist options
  • Select an option

  • Save luckycdev/acb67c68290577719abfaaa48e464d9e to your computer and use it in GitHub Desktop.

Select an option

Save luckycdev/acb67c68290577719abfaaa48e464d9e to your computer and use it in GitHub Desktop.
Crunchyroll Unlock PiP Userscript
// ==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