Skip to content

Instantly share code, notes, and snippets.

@MRuy
Created April 5, 2021 16:05
Show Gist options
  • Save MRuy/18821facecb7b609b2b48bfdc05ac890 to your computer and use it in GitHub Desktop.
Save MRuy/18821facecb7b609b2b48bfdc05ac890 to your computer and use it in GitHub Desktop.
Userscript: PiP everywhere
// ==UserScript==
// @name PictureInPicture
// @namespace pip
// @version 1.0.0
// @description PiP everywhere
// @author You
// @include *
// @grant GM_registerMenuCommand
// ==/UserScript==
GM_registerMenuCommand('Video popout', pip);
function pip() {
document.querySelector('video').requestPictureInPicture();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment