Greasy Fork

Greasy Fork is available in English.

Close Zoom Tabs!

make you not have to click the button to close like 100 zoom tabs that get opened every day!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Close Zoom Tabs!
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  make you not have to click the button to close like 100 zoom tabs that get opened every day!
//               especially now that chrome has re-added the checkbox to auto-open zoom, this makes it a 0-effort
//               process - to click a zoom link, then just click the "join with video" button.  
//               Note:  If your company has a custom zoom domain, you may need to add a second @match line for it
//               e.g., https://mycompany.zoom.us/j/*
// @author       Darin Kelkhoff
// @match        https://zoom.us/j/*
// @grant        window.close
// ==/UserScript==

(function() {
    'use strict';

    function makeTransparent(selector)
    {
        try // try, in case element isn't found in dom
        {
            document.querySelector(selector).style.background = "transparent";
        }
        catch(e) {}
    }

    function fadeToBlack()
    {
        console.log("starting fade to black");
        makeTransparent('#header_container');
        makeTransparent('[role="main"]');
        makeTransparent('#zoom-ui-frame');

        document.querySelector('body').style.transition = "all 4s linear";
        document.querySelector('body').style.backgroundColor = "black";
    }

    function close()
    {
        console.log("time to close the zoom window now");
        window.close();
    }

    setTimeout(fadeToBlack, 1000); // wait a second for elements to be in dom
    setTimeout(close, 5*1000); // wait a few seconds, to make sure zoom opened.

})();