Skip to content

Commit

Permalink
prioritize unpaused videos
Browse files Browse the repository at this point in the history
  • Loading branch information
Krazete committed Jun 5, 2023
1 parent 5c2c575 commit 877a60b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pop.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
var video = document.getElementsByTagName("video")[0];
var videos = Array.from(document.getElementsByTagName("video"));
var video = videos[0];
for (var v of videos) {
if (!v.paused) {
video = v;
break;
}
}
var pop;
function popout() {
video.removeAttribute("disablePictureInPicture");
Expand Down

0 comments on commit 877a60b

Please sign in to comment.