atcoder-affiliation-finder

When you click the affiliation, go to the ranking page (everyone who has the same affiliation appears only)

  1. // ==UserScript==
  2. // @name atcoder-affiliation-finder
  3. // @namespace https://twitter.com/_TTJR_
  4. // @version 0.22
  5. // @description When you click the affiliation, go to the ranking page (everyone who has the same affiliation appears only)
  6. // @author tsutaj
  7. // @match https://atcoder.jp/users/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. const linkHeader = 'https://atcoder.jp/ranking?f.Affiliation=';
  15. const trs = document.querySelectorAll('.dl-table tr');
  16.  
  17. trs.forEach(function(tr) {
  18. if(tr.innerText.search('所属') !== -1 || tr.innerText.search('Affiliation') !== -1) {
  19. const affiliation = tr.childNodes[1].innerText;
  20. const link = linkHeader + encodeURIComponent(affiliation);
  21. tr.childNodes[1].innerHTML = '<a href=' + link + '>' + affiliation + '</a>';
  22. }
  23. });
  24. })();
  25.  

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址