AtCoderTags_Hint

AtCoderの問題ページにカテゴリーを知ることの出来るボタンを設置します。

As of 2019-12-05. See the latest version.

// ==UserScript==
// @name         AtCoderTags_Hint
// @version      0.1
// @author       Null_Null
// @match        https://atcoder.jp/contests/*/tasks/*
// @match        https://*/tasks/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @require      https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @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-primary">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))
    })
})();