AtCoder CustomTest Run Shortcut

You can run by using Ctrl + Enter in Custom Test of AtCoder

05.11.2022 itibariyledir. En son verisyonu görün.

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

const element = document.querySelector('a.btn.btn-primary');
if(element.innerText.match(/^(Run|実行)$/)){ element.innerText += ' (Ctrl + Enter)'; }

(function() {
  document.addEventListener('keydown', function (event) {
      if ((event.ctrlKey || event.metaKey) && event.key === 'Enter'){
          const buttons = document.querySelector('a.btn.btn-primary');
          for(let button of buttons){
              if(button.innerText.match(/^(Run|実行)/)){
                  button.click();
              }
          }
      }
  });
})();