Greasy Fork镜像 还支持 简体中文。

Hide standings codeforces

Improved dark mode for Codeforces

  1. // ==UserScript==
  2. // @name Hide standings codeforces
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Improved dark mode for Codeforces
  6. // @author Der_Vlapos
  7. // @match https://codeforces.com/contest/*
  8. // @match http://codeforces.com/contest/*
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. function isContestRunning() {
  17. const state = document.querySelector('.contest-state-phase');
  18. if (state && (state.textContent.includes('Соревнование идет') || state.textContent.includes('Contest is running'))) {
  19. return true;
  20. }
  21. return false;
  22. }
  23.  
  24. function hideHowManySolved() {
  25. const rows = document.querySelectorAll('.problems tr');
  26. rows.forEach(row => {
  27. const tds = row.querySelectorAll('td:nth-child(4)');
  28. tds.forEach(td => {
  29. const links = td.querySelectorAll('a');
  30. links.forEach(link => {
  31. link.style.display = 'none';
  32. });
  33. });
  34. });
  35. }
  36.  
  37. function hideStandingsButton() {
  38. const lists = document.querySelectorAll('ul.second-level-menu-list');
  39. lists.forEach(list => {
  40. const items = list.querySelectorAll('li');
  41. items.forEach(item => {
  42. const link = item.querySelector('a');
  43. if (link && (link.textContent.includes('Standings') || link.textContent.includes('Положение'))) {
  44. item.style.display = 'none';
  45. }
  46. });
  47. });
  48. }
  49.  
  50.  
  51. if (isContestRunning()) {
  52. hideHowManySolved();
  53. hideStandingsButton();
  54. }
  55. })();

QingJ © 2025

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