AtCoder_submit_keyboard_shortcut

atcoderにおいてCtrl+Enterで提出ができるようになります

当前为 2019-03-27 提交的版本,查看 最新版本

// ==UserScript==
// @name           AtCoder_submit_keyboard_shortcut
// @version        1.1
// @description    atcoderにおいてCtrl+Enterで提出ができるようになります
// @author         Osmium_1008
// @license        MIT
// @include        https://atcoder.jp/contests/*/tasks/*
// @include        https://atcoder.jp/contests/*/submit
// @include        https://*.contest.atcoder.jp/submit*
// @supportURL     https://twitter.com/Osmium_1008
// @namespace https://gf.qytechs.cn/users/251827
// ==/UserScript==
(function() {
    document.addEventListener('keydown', function (event) {
        if ((event.ctrlKey||event.metaKey)&&event.keyCode==13){
            if((window.location.href).match(new RegExp('contests'))!=null){
                console.log("new");
                document.getElementById('submit').click();
            }
            else{
                console.log("old");
                (document.getElementsByClassName('btn btn-primary btn-large'))[0].click();
            }
        }
    }, false);
})();

QingJ © 2025

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