Twitcasting Ctrl+Enter

It enable to send comment with ctrl + enter

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Twitcasting Ctrl+Enter
// @namespace    https://twitter.com/yoigara3
// @version      1.0
// @description  It enable to send comment with ctrl + enter
// @author       yoigara3
// @match        https://twitcasting.tv/*
// @exclude      https://twitcasting.tv/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=twitcasting.tv
// @grant        none
// @license      WTFPL
// ==/UserScript==

(function() {
    'use strict';
    const area = document.getElementsByClassName('tw-textarea')[0];
    const button = document.getElementsByClassName('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);
})();