chrome/script.js
/**
 * Exiting Picture-in-Picture mode
 */
Exiting Picture-in-Picture mode
Exiting Picture - in - Picture mode
function exitPiP() {
  let hasExitPiP = false;
  if (document.querySelector('[__pip__]')) {
    document.exitPictureInPicture().catch(() => {});
    document.querySelectorAll('[__pip__]').forEach(video => video.removeAttribute('__pip__'));
    document.body.removeAttribute('__pip_watch__');
    hasExitPiP = true;
  }
  return hasExitPiP;
}
function exitPiP ( ) { let hasExitPiP = false ; if ( document . querySelector ( '[__pip__]' ) ) { document . exitPictureInPicture ( ) . catch ( ( ) => { } ) ; document . querySelectorAll ( '[__pip__]' ) . forEach ( video => video . removeAttribute ( '__pip__' ) ) ; document . body . removeAttribute ( '__pip_watch__' ) ; hasExitPiP = true ; } return hasExitPiP ; }
Exiting Picture-in-Picture mode
Exiting Picture - in - Picture mode