AtCoder Permanent Contests

beta.atcoder.jpにおいて、常設されているコンテストを他のコンテストと分けて表示します

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, Greasemonkey alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey alebo Userscripts.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie správcu používateľských skriptov.

(Už mám správcu používateľských skriptov, nechajte ma ho nainštalovať!)

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

(Už mám správcu používateľských štýlov, nechajte ma ho nainštalovať!)

// ==UserScript==
// @name        AtCoder Permanent Contests
// @description beta.atcoder.jpにおいて、常設されているコンテストを他のコンテストと分けて表示します
// @version     1.0
// @author      euglenese
// @match       beta.atcoder.jp
// @match       beta.atcoder.jp/?*
// @namespace https://greasyfork.org/users/201019
// ==/UserScript==


// 日本語

var permanent_contests = $("h4").filter(function(){
	return $(this).text() == "開催中のコンテスト";
}).next().find("tr").filter(function(){
	var contest_name = $(this).find("a").text();
	return contest_name == "6/25(月) 00:00practice contest" || contest_name == "12/13(水) 21:00AtCoder Programming Guide for beginners (APG4b)" || contest_name == "3/14(水) 12:00AtCoder Beginners Selection";
});

$("h4").filter(function(){
	return $(this).text() == "開催中のコンテスト";
}).next().next().after('<h4>常設されているコンテスト</h4><div class="table-responsive"><table class="table table-default table-striped table-hover table-condensed small" style="margin-bottom:0;"><thead><th width="36%">開始時刻</th><th>コンテスト名</th></tr></thead><tbody></tbody></table></div><hr>');

var permanent_contests_table = $("h4").filter(function(){
	return $(this).text() == "常設されているコンテスト";
}).next().find("tbody");

for(var i = 0; i < permanent_contests.length; i++){
	permanent_contests_table.append(permanent_contests[i]);
}

// English

var permanent_contests = $("h4").filter(function(){
	return $(this).text() == "Active Contests";
}).next().find("tr").filter(function(){
	var contest_name = $(this).find("a").text();
	return contest_name == "6/25(Mon) 00:00practice contest";
});

$("h4").filter(function(){
	return $(this).text() == "Active Contests";
}).next().next().after('<h4>Permanent Contests</h4><div class="table-responsive"><table class="table table-default table-striped table-hover table-condensed small" style="margin-bottom:0;"><thead><th width="36%">Start Time</th><th>Contest Name</th></tr></thead><tbody></tbody></table></div><hr>');

var permanent_contests_table = $("h4").filter(function(){
	return $(this).text() == "Permanent Contests";
}).next().find("tbody");

for(var i = 0; i < permanent_contests.length; i++){
	permanent_contests_table.append(permanent_contests[i]);
}