Hide Google Meet Visitor Icon

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

当前为 2023-12-14 提交的版本,查看 最新版本

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

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

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴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);
}
})();