Quickly find fastest solution.
当前为
// ==UserScript==
// @name CodeForces Solution Opener
// @namespace slbtty.codeforces.solution
// @match https://codeforces.com/problemset/problem/*/*
// @grant none
// @license GPLv3
// @version 1.0.2
// @home-url https://github.com/shenlebantongying
// @author slbtty
// @description Quickly find fastest solution.
// ==/UserScript==
const url = document.URL
url_parts=url.split("/")
const new_url = "https://codeforces.com/problemset/status/"
+url_parts[url_parts.length-2]
+"/problem/"
+url_parts[url_parts.length-1]
+"?order=BY_CONSUMED_TIME_ASC"
var mainMenu = document.querySelector(".main-menu-list");
var solution_li = document.createElement("li");
var btn = document.createElement('a');
btn.setAttribute('href',new_url);
btn.innerHTML = "Solution";
solution_li.appendChild(btn);
mainMenu.appendChild(solution_li);