AtCoderUsers

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

2021-01-28 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

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