Meet FulScreen

30.08.2021, 18:20:22

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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