AtCoderUsers

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

  1. // ==UserScript==
  2. // @name AtCoderUsers
  3. // @namespace https://atcoder.jp/
  4. // @version 0.2
  5. // @description プロフィールのページに情報を追加します。
  6. // @author magurofly
  7. // @match https://atcoder.jp/users/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. const user = location.pathname.split("/")[2];
  14. const leftTable = $(".dl-table").eq(0).find("tbody");
  15.  
  16. // AtCoder Problems
  17. {
  18. const cell = $("<td>");
  19. const group = $("<div>").addClass("btn-group");
  20. for (const [page, title] of [["table", "Table"], ["list", "List"], ["user", "User"]]) {
  21. group.append($("<a>").addClass("btn btn-default").attr("href", `https://kenkoooo.com/atcoder/#/${page}/${user}`).text(title));
  22. }
  23. leftTable.append($("<tr>").append($("<th>").addClass("no-break").text("Problems"), cell.append(group)));
  24. }
  25.  
  26. // other statistics
  27. {
  28. const cell = $("<td>");
  29. cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoder-tags.herokuapp.com/graph/${user}?`).text("Tags Graph"));
  30. cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoderapps.herokuapp.com/atcoderperformances/show_graph/?username=${user}`).text("Performances"));
  31. cell.append($("<a>").addClass("btn btn-default").attr("href", `https://atcoder-scores.herokuapp.com/?user=${user}`).text("Scores"));
  32. leftTable.append($("<tr>").append($("<th>").addClass("no-break").text("Statistics"), cell));
  33. }
  34. })();