Last active
January 13, 2017 02:49
-
-
Save dbryand/242493d3dbb2d97980289c883965b48f to your computer and use it in GitHub Desktop.
Bookmarklet for Safari to Picture-in-Picture the currently playing video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a bookmark in safari with this as the address | |
javascript: (function() {var video; document.querySelectorAll('video').forEach(function(vid) { if (!vid.paused) video = vid; }); if (video) { video.webkitSetPresentationMode('picture-in-picture') } })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is what it looks like when you go to bookmarks and create it: