Remove PiP Disable Attributes

Clear disablePictureInPicture attributes from videos.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Remove PiP Disable Attributes  
// @version      1.0
// @description  Clear disablePictureInPicture attributes from videos.
// @author       Polywock
// @include      http://*
// @include      https://*
// @namespace    https://github.com/polywock
// ==/UserScript==

window.addEventListener("play", function(e) {
    e.target.removeAttribute("disablePictureInPicture")
}, true)

window.addEventListener("pause", function(e) {
    e.target.removeAttribute("disablePictureInPicture")
}, true)