Skip to content

Instantly share code, notes, and snippets.

@gianluca-sabena
Created January 22, 2022 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gianluca-sabena/e52014f040181485d51cdbf12f630c2a to your computer and use it in GitHub Desktop.
Save gianluca-sabena/e52014f040181485d51cdbf12f630c2a to your computer and use it in GitHub Desktop.
Tampermonkey - Google Meet Toggle Mute
// ==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