Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hirios/5a194291acdf465f7846834d871ac2c6 to your computer and use it in GitHub Desktop.
Save hirios/5a194291acdf465f7846834d871ac2c6 to your computer and use it in GitHub Desktop.
Google Meet FullScreen
// ==UserScript==
// @name Meet Fullscreen
// @namespace http://tampermonkey.net/
// @version 2025-01-09
// @description try to take over the world!
// @author You
// @match https://meet.google.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant none
// ==/UserScript==
var meuIntervalo = setInterval(()=>{
if (document.querySelector('[style*="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL"]') != true) {
(function() {
const randomFullNumber = window.__meetsRandomNumber = window.__meetsRandomNumber || Math.floor(Math.random() * 1000000)
const className = `button-${randomFullNumber}`;
[...document.getElementsByClassName(className)].forEach(e => e.remove())
;
[...document.getElementsByTagName('video')].forEach(addButton)
function addButton(video) {
const btn = document.createElement("button")
btn.setAttribute('tabindex', 1)
btn.setAttribute('class', className)
btn.setAttribute('style', `
z-index: 999999999;
background: white;
width: 28px;
height: 28px;
position: absolute;
right: 50px;
display: block;
border-radius: 14px;
margin: 8px;
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCI+DQogIDx0aXRsZT4NCiAgICBmdWxsc2NyZWVuDQogIDwvdGl0bGU+DQogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTEgMXY2aDJWM2g0VjFIMXptMiAxMkgxdjZoNnYtMkgzdi00em0xNCA0aC00djJoNnYtNmgtMnY0em0wLTE2aC00djJoNHY0aDJWMWgtMnoiLz4NCjwvc3ZnPg0K');
background-repeat: no-repeat;
background-position: center;
filter: invert(1);
`)
btn.addEventListener('focus', () => {
btn.style.outline = '5px solid #c00'
})
btn.addEventListener('blur', () => {
btn.style.outline = ''
})
if (video.style.display !== 'none') {
video.parentElement.parentElement.appendChild(btn)
btn.addEventListener('click', (event) => {
video.requestFullscreen()
video.addEventListener('fullscreenchange', function focusOnFullScreenExit() {
if (!document.fullscreenElement) {
video.removeEventListener('fullscreenchange', focusOnFullScreenExit)
btn.focus()
}
})
})
}
}
})();
}
}, 1000)
@hirios
Copy link
Author

hirios commented Jan 9, 2025

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment