AtCoder Default Search Fields

すべての提出検索にデフォルトの値を設定します

Verze ze dne 27. 05. 2022. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name    AtCoder Default Search Fields
// @namespace    http://tampermonkey.net/
// @version    0.1
// @description    すべての提出検索にデフォルトの値を設定します
// @author    Chippppp
// @license    MIT
// @match    https://atcoder.jp/contests/*
// @grant    none
// ==/UserScript==

(function() {
    "use strict";

    let path = location.pathname.split("/");
    let ul = document.getElementsByClassName("dropdown-menu")[2];
    if (ul == undefined) return;
    let problem = "";
    let idx = path.indexOf("tasks");
    if (idx != -1 && idx + 1 < path.length) {
        problem = path[idx + 1];
    }
    ul.children[0].children[0].href += `?f.Task=${problem}&f.LanguageName=&f.Status=AC&f.User=`;
    ul = document.getElementsByClassName("nav nav-pills small")[0];
    if (ul == undefined) return;
    ul.children[0].children[0].href += `?f.Task=&f.LanguageName=&f.Status=AC&f.User=`;
})();