Skip to content

Instantly share code, notes, and snippets.

@dolpen
Created August 6, 2014 04:06
Show Gist options
  • Select an option

  • Save dolpen/e4b4cede905ed6e6a6d7 to your computer and use it in GitHub Desktop.

Select an option

Save dolpen/e4b4cede905ed6e6a6d7 to your computer and use it in GitHub Desktop.
あなたとJava
// ==UserScript==
// @name atcoder java
// @namespace http://www.dolpen.net/
// @description java and you
// @match http://*.atcoder.jp/submit
// @match http://*.atcoder.jp/submit*
// ==/UserScript==
(function () {
var sels = document.querySelectorAll(".submit-language-selector");
for (var i = 0; i < sels.length; i++) {
var sel = sels.item(i);
var opts = sel.childNodes;
for (var j = 0; j < opts.length; j++) {
var opt = opts.item(j);
if (opt.textContent.indexOf("Java ") >= 0) {
opt.selected = true;
break;
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment