AtCoder-HiderRatingAndPerformance

The tools to hide atcoder rating and performance

当前为 2024-04-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name AtCoder-HiderRatingAndPerformance
  3. // @namespace https://github.com/PenguinCabinet
  4. // @version v0.0.1
  5. // @description The tools to hide atcoder rating and performance
  6. // @author PenguinCabinet
  7. // @license MIT
  8. // @match https://atcoder.jp/users/*
  9. // @match https://atcoder.jp/contests/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. //config
  14. const config_hide_ranking=false;
  15. //config
  16.  
  17. (function() {
  18. 'use strict';
  19.  
  20. if(window.location.href.match(/contests/)){
  21. if(config_hide_ranking){
  22. let lis=document.querySelectorAll('li');
  23. lis.forEach(function(elem){
  24. console.log(elem.textContent)
  25. if(
  26. elem.textContent.match(/順位表/)
  27. ){
  28. elem.style.display = 'none';
  29. }
  30. });
  31. }
  32. }
  33. else if(window.location.href.match(/history/)){
  34. let tables=document.querySelectorAll('table');
  35. tables.forEach(function(elem){
  36. let len=elem.rows.length;
  37.  
  38. for (let i=0;i<len;i++) {
  39. for(let j=0;j<(config_hide_ranking?5:4);j++){
  40. elem.rows[i].deleteCell(-1);
  41. }
  42. }
  43. })
  44. }else{
  45. let ths=document.querySelectorAll('th');
  46. ths.forEach(function(elem){
  47. if(
  48. elem.textContent=="Rating"
  49. ||elem.textContent=="Rating最高値"
  50. ){
  51. elem.nextElementSibling.firstElementChild.textContent="XXXX";
  52. }
  53. });
  54.  
  55. let canvases=document.querySelectorAll('canvas');
  56. canvases.forEach(function(elem){
  57. elem.parentNode.style.display = 'none';
  58. });
  59. }
  60. // Your code here...
  61. })();

QingJ © 2025

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