AtCoderの問題ページにカテゴリーを知ることの出来るボタンを設置します。
当前为
// ==UserScript==
// @name AtCoderTags_Hint
// @version 0.4
// @author Null_Null
// @match https://atcoder.jp/contests/*/tasks/*
// @match https://*/tasks/*
// @grant none
// @namespace https://github.com/null-null-programming/AtCoderTags-Helper
// @description AtCoderの問題ページにカテゴリーを知ることの出来るボタンを設置します。
// ==/UserScript==
(function() {})();
function getContestName() {
let contestURL = location.href;
let contestArray = contestURL.split('/');
return contestArray[contestArray.length - 1];
}
$('#contest-nav-tabs').prepend(`<div>
<button id="tags-hint" class="btn btn-primaryr">Hint</button>
</div>`);
(async function() {
$('#tags-hint').click(function() {
var probleme_id = getContestName();
window.open().location.href =(('https://atcoder-tags.herokuapp.com/check/'+probleme_id))
})
})();