AtCoderUsers

プロフィールのページに情報を追加します。

Från och med 2021-01-28. Se den senaste versionen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         AtCoderUsers
// @namespace    https://atcoder.jp/
// @version      0.1
// @description  プロフィールのページに情報を追加します。
// @author       magurofly
// @match        https://atcoder.jp/users/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const user = location.pathname.split("/")[2];
    const leftTable = $(".dl-table").eq(0).find("tbody");

    // AtCoder Problems
    {
        const cell = $("<td>");
        const group = $("<div>").addClass("btn-group");
        for (const [page, title] of [["table", "Table"], ["list", "List"], ["user", "User"]]) {
            group.append($("<a>").addClass("btn btn-default").attr("href", `https://kenkoooo.com/atcoder/#/${page}/${user}`).text(title));
        }
        leftTable.append($("<tr>").append($("<th>").addClass("no-break").text("AtCoder Problems"), cell.append(group)));
    }

    // other statistics
    {
        const cell = $("<td>");
        cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoder-tags.herokuapp.com/graph/${user}?`).text("AtCoder Tags Graph"));
        cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoderapps.herokuapp.com/atcoderperformances/show_graph/?username=${user}`).text("AtCoder Performances"));
        cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoder-scores.herokuapp.com/?user=${user}`).text("AtCoder Scores"));
        leftTable.append($("<tr>").append($("<th>").addClass("no-break").text("Statistics"), cell));
    }
})();