Created
January 22, 2022 15:48
-
-
Save gianluca-sabena/e52014f040181485d51cdbf12f630c2a to your computer and use it in GitHub Desktop.
Tampermonkey - Google Meet Toggle Mute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Meet Toggle Mute | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://meet.google.com/* | |
// @icon https://fonts.gstatic.com/s/i/productlogos/meet_2020q4/v1/web-64dp/logo_meet_2020q4_color_1x_web_64dp.png | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const keydownEvent = new KeyboardEvent('keydown', { | |
"key": "d", | |
"code": "KeyD", | |
"metaKey": true, | |
"charCode": 100, | |
"keyCode": 100, | |
"which": 100 | |
}) | |
document.body.onkeydown = function(e) { | |
if(e.keyCode == 32 && window._meetupSpaceDown !== true){ | |
e.stopPropagation(); | |
e.preventDefault(); | |
document.dispatchEvent(keydownEvent) | |
} | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment