ZoomUtils

A bunch of small utilities for Zoom Web Meetings.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         ZoomUtils
// @namespace    https://letga.me/
// @version      0.3.1.1
// @description  A bunch of small utilities for Zoom Web Meetings.
// @author       LetGame
// @license      MIT
// @match        https://zoom.us/*
// @match        https://*.zoom.us/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zoom.us
// @grant        window.close
// ==/UserScript==

/* jshint esversion: 8 */

(function() {
    'use strict';

    const addTimer = async(element, seconds) => { // timer function
        const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); // sleep function for delays

        const text = element.innerText;
        for (var t = seconds; t > 0; t--) {
            element.innerText = text + ' (' + t + ')';
            await sleep(1000);
        }
        element.innerText = text + ' (0)';
        await sleep(100); // additional 100ms timeout to avoid bugs
    };

    const q = e => document.querySelector(e); // querySelector shortcut

    window.addEventListener('load', () => {
        q('body').style.fontFamily = "sans-serif"; // fix fonts

        if (window.location.href.match('zoom.us/j/')) { // web client redirector
            window.location.href = window.location.href.replace('/j/', '/wc/join/');
        }

        if (window.location.href.match('zoom.us/wc/leave')) {
            q('#change_bo').style.display = 'none'; // remove the annoying message to switch to chrome
            addTimer(q('.leave-wrap h1'), 5).then(() => {window.close();}); // auto close ended meetings
        }

        if (window.location.href.match('zoom.us/wc/join/')) {
            addTimer(q("#joinBtn"), 5).then(() => {q("#joinBtn").click();}); // auto join button press
        }
    });
})();