MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / leavePIP

Function leavePIP

scripts/pip_canvas.js:38–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 function leavePIP() {
39 if (document.pictureInPictureElement) document.exitPictureInPicture();
40 window.ufs_pip_fullWebsite.isPIP = false;
41 window.ufs_pip_fullWebsite.video?.remove?.();
42 window.ufs_pip_fullWebsite.stream
43 ?.getVideoTracks?.()
44 .forEach((track) => {
45 track.stop();
46 });
47 window.ufs_pip_fullWebsite.stream = null;
48 }
49
50 function findLargestCanvasInViewport() {
51 return Array.from(document.querySelectorAll("canvas")).sort(

Callers 1

pip_canvas.jsFile · 0.70

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected