atcoder_all_open

問題Tabの隣に全ての問題を(ワンクリックで)開く全ての問題Tabを作成します。うまく動かない場合はatcoder上でのポップアップ制限を外して下さい

Tính đến 03-08-2020. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

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

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name     atcoder_all_open
// @namespace jp.misw
// @author hotman
// @description:ja 問題Tabの隣に全ての問題を(ワンクリックで)開く全ての問題Tabを作成します。うまく動かない場合はatcoder上でのポップアップ制限を外して下さい
// @version  1.0.2
// @include  https://atcoder.jp/contests/*/tasks
// @grant    none
// @description 問題Tabの隣に全ての問題を(ワンクリックで)開く全ての問題Tabを作成します。うまく動かない場合はatcoder上でのポップアップ制限を外して下さい
// ==/UserScript==


function toURL(){
    var cnt=document.getElementsByClassName("table table-bordered table-striped")[0].children[1].childElementCount;
    var test_name=location.href.split('/')[4];
    for(var i=0;i<cnt;i++){
        window.open('https://atcoder.jp/contests/'+test_name+'/tasks/'+test_name+'_'+String.fromCharCode('a'.charCodeAt(0)+i));
    }
}


function all_open(){
    var parent=document.getElementsByClassName("nav nav-tabs")[0];
    var add=document.createElement("li");
    parent.insertBefore(add,parent.children[2]);
    var a=document.createElement("a");
    add.appendChild(a);
    a.textContent="全ての問題";
    a.setAttribute("href","javascript:void(0);");
    a.addEventListener('click',toURL, false);
}
all_open();