Skip to content

Instantly share code, notes, and snippets.

@brlodi
Created February 24, 2023 18:52
Show Gist options
  • Save brlodi/8074eb818db288f829c3d87a79113d46 to your computer and use it in GitHub Desktop.
Save brlodi/8074eb818db288f829c3d87a79113d46 to your computer and use it in GitHub Desktop.
A userscript to clean up those annoying "Launch Meeting" tabs Zoom likes to open. I'm not positive I've captured every path variation Zoom uses so let me know if you find one that doesn't work.
// ==UserScript==
// @name Autoclose Zoom Launch Meeting windows
// @namespace Violentmonkey Scripts
// @match https://*.zoom.us/j/*
// @match https://*.zoom.us/s/*
// @grant window.close
// @version 1.0
// @author Benjamin Lodi <brlodi@gmail.com>
// @description 2/24/2023, 12:47:07 PM
// ==/UserScript==
const maxDelay = 30 * 1000; // ms
const falloffFactor = 1.2;
let delay = 200; // ms
const doClose = () => {
if (window.location.hash.includes('#success')) {
window.close();
}
delay = Math.floor(Math.min(delay * falloffFactor, maxDelay));
setTimeout(doClose, delay);
};
doClose();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment