Greasy Fork is available in English.

AtCoder_CustomTest_Run_Shortcut

AtCoderのコードテストにおいてCtrl+Enterで実行ができるようになります。You can run by using Ctrl + Enter in Custom Test of AtCoder

Version vom 14.12.2020. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         AtCoder_CustomTest_Run_Shortcut
// @namespace    https://greatest.deepsurf.us/ja/users/570127
// @version      0.1
// @description  AtCoderのコードテストにおいてCtrl+Enterで実行ができるようになります。You can run by using Ctrl + Enter in Custom Test of AtCoder
// @author       universato
// @grant        none
// @include      https://atcoder.jp/contests/*/custom_test
// @include      https://atcoder.jp/contests/*/custom_tets*
// @license      MIT
// @supportURL   https://twitter.com/universato
// ==/UserScript==

(function() {
    document.addEventListener('keydown', function (event) {
        if ((event.ctrlKey||event.metaKey)&&event.keyCode==13){
            var elements = document.getElementsByClassName('btn btn-primary');
            for(var i = 0; i < elements.length; ++i){
                console.log(elements[i].innerHTML)
                if(elements[i].innerHTML == "実行"){
                    elements[i].click();
                }
            }
        }
    }, false);
})();