// ==UserScript==
// @name Disney+ PiP
// @namespace pauljones.io
// @version 0.1
// @description Enable PiP on Disney+ videos.
// @author Paul Jones
// @match https://www.disneyplus.com/*
// @grant none
// ==/UserScript==
"use strict";
(function () {
const targetNode = document.getElementById("app_index");
const observer = new MutationObserver((mutationsList, observer) => {
mutationsList.forEach((item) => {
if (item.type === "attributes" && item.attributeName === "autoplay") {
item.target.disablePictureInPicture = false;
}
});
});
observer.observe(targetNode, {
attributes: true,
childList: true,
subtree: true,
});
})();
Userscript: Disney+ PiP
Disney+ disables picture-in-picture, this reenables it.