Twitcasting Ctrl+Enter

It enable to send comment with ctrl + enter

< 腳本Twitcasting Ctrl+Enter的回應

評論:負評 - 腳本失效或無法使用

§
發表於:2023-04-22
編輯:2023-04-22

(function() {
'use strict';
const area = document.getElementsByClassName('tw-textarea')[0];
const button = document.querySelectorAll('.tw-comment-post-operations .tw-button-primary')[0];
if(!area || !button) return;
const send = () => {
button.click();
}
const handleEvent = (e) => {
if(e.code=='Enter' && e.ctrlKey && area.value!==''){
send();
}
}
document.addEventListener("keydown",handleEvent);
})();

別のボタンをクリックしてしまっていたので、こちらが正しいようです。

發表回覆

登入以回復

QingJ © 2025

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