Last active
March 11, 2021 15:18
-
-
Save splintor/fc4e357f7c7b0dc2701dd12101fd1a42 to your computer and use it in GitHub Desktop.
Zoom - auto-close browser window
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 Zoom - auto-close browser window | |
// @version 0.2 | |
// @description Auto-close Zoom browser window after 15 seconds | |
// @author Shmulik Flint | |
// @match https://wix.zoom.us/* | |
// @match https://zoom.us/postattendee* | |
// @downloadURL https://gist.github.com/splintor/fc4e357f7c7b0dc2701dd12101fd1a42/raw | |
// @updateURL https://gist.github.com/splintor/fc4e357f7c7b0dc2701dd12101fd1a42/raw | |
// @icon https://wix.zoom.us/zoom.ico | |
// @grant none | |
// ==/UserScript== | |
// NOTE: For this to work on Firefox, you need to set the `dom.allow_scripts_to_close_windows` settings in `about:config` to true (see https://stackoverflow.com/a/330372/46635) | |
(function() { | |
'use strict'; | |
if (location.href.includes('postattendee')) { | |
window.close();a | |
} | |
setTimeout(() => { | |
const button = document.querySelector('div[role="button"]') | |
if (button && button.innerText === 'Launch Meeting') { | |
window.close() | |
} | |
}, 5000) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment