【twitcasting】QuickComment

ctrl + Enterで送信

  1. // ==UserScript==
  2. // @name 【twitcasting】QuickComment
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2.2
  5. // @description ctrl + Enterで送信
  6. // @author You
  7. // @match https://ja.twitcasting.tv/*
  8. // @match https://twitcasting.tv/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=twitcasting.tv
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14.  
  15.  
  16.  
  17. function main(){
  18. const buttonTW = document.querySelector('button.tw-button-primary');
  19. const textareaTW = document.querySelector('textarea.tw-textarea');
  20. if(buttonTW === null || textareaTW === null){
  21. setTimeout(()=>{
  22. main();
  23. return;
  24. },300)
  25. }else{
  26. console.log('ロード完了');
  27. textareaTW.addEventListener("keydown",(e)=>{
  28. if(e.code === 'Enter' && e.ctrlKey) buttonTW.click();
  29. })
  30. }
  31. }
  32.  
  33. main();

QingJ © 2025

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