AtCoderUsers

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

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.2
// @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("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("Tags Graph"));
        cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoderapps.herokuapp.com/atcoderperformances/show_graph/?username=${user}`).text("Performances"));
        cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoder-scores.herokuapp.com/?user=${user}`).text("Scores"));
        leftTable.append($("<tr>").append($("<th>").addClass("no-break").text("Statistics"), cell));
    }
})();