AtCoder Default Search Fields

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

28.05.2022 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name    AtCoder Default Search Fields
// @namespace    http://tampermonkey.net/
// @version    0.2
// @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];
    }
    if (!ul.children[0].children[0].href.endsWith("me")) 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;
    if (!ul.children[0].children[0].href.endsWith("me")) ul.children[0].children[0].href += `?f.Task=&f.LanguageName=&f.Status=AC&f.User=`;
})();