AtCoderUsers

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

Verze ze dne 28. 01. 2021. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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));
    }
})();