See-friends-codeforces

Introduces a button which takes you to the friends standings directly

  1. // ==UserScript==
  2. // @license MIT
  3. // @name See-friends-codeforces
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.1
  6. // @description Introduces a button which takes you to the friends standings directly
  7. // @author Abhishek
  8. // @match https://codeforces.com/*/problem/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=codeforces.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. let url = window.location;
  16. let contestId = url.toString().split("/").filter((x)=>{
  17. if(typeof x !== 'string'){return;}
  18. const num = Number(x);
  19. if(Number.isInteger(num)){return num;}
  20. })[0];
  21.  
  22. let friendBtn = document.createElement('li');
  23. friendBtn.innerHTML = `<a href="https://codeforces.com/contest/${contestId}/standings/friends/true">See Friends</a>`;
  24. friendBtn.classList.add('friendBtn')
  25. document.querySelector(".second-level-menu-list").appendChild(friendBtn);
  26.  
  27.  
  28. })();

QingJ © 2025

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