atcoderにおいてCtrl+Enterで提出ができるようになります
当前为
// ==UserScript==
// @name AtCoder_submit_keyboard_shortcut
// @version 1.2
// @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://greatest.deepsurf.us/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);
})();