Hide Google Meet Visitor Icon

Remove screen space wasting "Visitors are in this meeting" warning icon

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Hide Google Meet Visitor Icon
// @namespace    https://greasyfork.org/en/users/922168-mark-zinzow
// @version      0.5
// @description  Remove screen space wasting "Visitors are in this meeting" warning icon
// @author       Mark Zinzow
// @match        https://meet.google.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @supportURL   https://greasyfork.org/en/scripts/481476-hide-google-meet-visitor-icon/feedback
// @license MIT
// @grant none
// @run-at document-end
// ==/UserScript==

// If you wish to remove the visitor div manually, paste this one line into the console:
//  document.querySelector('div[jscontroller="hVZhab"][data-side="1"]').remove();
(function() {
    'use strict';
    var removed = 0;
    function killIconDiv() {
    const firstDiv = document.querySelector('div[jscontroller="hVZhab"][data-side="1"]'); //This should prevent deleting the controls!
        if (firstDiv && !removed) {
          console.log("Div found.");
          removed = 1;
          firstDiv.remove();
        }
    }
// Didn't work unless a visitor was already in the meeting
    for (let i = 0; i < 600 ; i++) { //600 keeps trying to remove this icon every 2 seconds for 20 minutes
        if (removed) break;
    setTimeout(killIconDiv, i*2000);
}
})();