ctrl^C + ctrl^V = 💪

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         ctrl^C + ctrl^V = 💪
// @namespace    http://tampermonkey.net/
// @version      ver-6.9
// @description  pressing "Numpad Subtract" to copy and paste the very last message in the chat!!
// @author       vflc
// @match        https://meet.google.com/*
// ==/UserScript==

(function() {
  'use strict';

  document.body.onkeyup = function(e) {
    // 109 is the keycode for "Numpad Subtract"
    // here's the keycode list
    // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
    if(e.keyCode == 109){
      e.stopPropagation();
      e.preventDefault();

      let chat = document.getElementsByClassName("oIy2qc");
      let text = chat[chat.length - 1].innerHTML;

      let input = document.getElementsByClassName("KHxj8b tL9Q4c");
      input[0].value = text;

      let send = document.getElementsByClassName("uArJ5e Y5FYJe cjq2Db IOMpW Cs0vCd RDPZE");
      send[0].setAttribute("aria-disabled",false);
      send[0].click();
      send[0].setAttribute("aria-disabled",true);
      document.activeElement.blur();
    }
  };

})();