ctrl^C + ctrl^V = 💪

pressing "Numpad Subtract" to copy and paste the very last message in the chat!!

  1. // ==UserScript==
  2. // @name ctrl^C + ctrl^V = 💪
  3. // @namespace http://tampermonkey.net/
  4. // @version ver-6.9
  5. // @description pressing "Numpad Subtract" to copy and paste the very last message in the chat!!
  6. // @author vflc
  7. // @match https://meet.google.com/*
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. document.body.onkeyup = function(e) {
  14. // 109 is the keycode for "Numpad Subtract"
  15. // here's the keycode list
  16. // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
  17. if(e.keyCode == 109){
  18. e.stopPropagation();
  19. e.preventDefault();
  20.  
  21. let chat = document.getElementsByClassName("oIy2qc");
  22. let text = chat[chat.length - 1].innerHTML;
  23.  
  24. let input = document.getElementsByClassName("KHxj8b tL9Q4c");
  25. input[0].value = text;
  26.  
  27. let send = document.getElementsByClassName("uArJ5e Y5FYJe cjq2Db IOMpW Cs0vCd RDPZE");
  28. send[0].setAttribute("aria-disabled",false);
  29. send[0].click();
  30. send[0].setAttribute("aria-disabled",true);
  31. document.activeElement.blur();
  32. }
  33. };
  34.  
  35. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址