Meet FulScreen

30.08.2021, 18:20:22

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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')
    }
  }
}