Meet FulScreen

30.08.2021, 18:20:22

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name        Meet FulScreen
// @namespace   Violentmonkey Scripts
// *://*/*
// @match       https://meet.google.com/*
// @grant       none
// @version     1.1
// @author      -
// @description 30.08.2021, 18:20:22
// ==/UserScript==

let fullScreen = false

document.body.onkeydown = e => {
  const header = document.querySelector('[data-avatar-size="s"]')?.parentNode.parentNode.parentNode.parentNode
  const footer = document.querySelector('[data-capture-type]')?.parentNode.parentNode.parentNode.parentNode.parentNode
  const floater = header?.nextElementSibling.firstElementChild.firstElementChild
  const presentation = document.querySelector('[style="inset: 72px 16px 80px;"]')
  
  if (e.key === 'F' && e.ctrlKey && e.altKey && e.shiftKey) {
    if (fullScreen) {
      header.style.display = null
      footer.style.display = null
      floater.style.display = null
      presentation.style = 'inset: 72px 16px 80px;'
      
      fullScreen = false
      console.log('Monkey disables FullScreen')
    } else {
      header.style.display = 'none'
      footer.style.display = 'none'
      floater.style.display = 'none'
      presentation.style = 'height: 100%'
      
      fullScreen = true
      console.log('Monkey enables FullScreen')
    }
  }
}