您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Copy google meet participants to clipboard on "u" key click
// ==UserScript== // @name Google Meet Attendance // @namespace http://tampermonkey.net/ // @version 0.1 // @description Copy google meet participants to clipboard on "u" key click // @author You // @match https://meet.google.com/* // @grant none // ==/UserScript== (function() { function copyToClipboard(text) { window.prompt("Copy to clipboard: Ctrl+C, Enter", text); } 'use strict'; function main(){ var divs = document.getElementsByTagName("div"); var newNames = [""]; for (var i=0; i<divs.length; i++){ if (divs[i].getAttribute("aria-label")!=null && divs[i].getAttribute("aria-label").includes("Show more actions for ")){ //console.log(i); var name = (divs[i].getAttribute("aria-label").replace("Show more actions for", "")); //console.log(name); if (newNames.indexOf(name)==-1){ //console.log("success"); newNames.push(name); } } } copyToClipboard(newNames); } document.onkeydown = function(e){ e = e || window.event; var key = e.which || e.keyCode; if(key===85){ //change key code, currently set to "u" main(); } } })();