atcoder_constraints_eraser

AtCoderの問題ページに記載されている制約を消すユーザースクリプトです

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name        atcoder_constraints_eraser
// @namespace   http://tampermonkey.net/
// @version     1.0
// @description AtCoderの問題ページに記載されている制約を消すユーザースクリプトです
// @author      arad
// @match       https://atcoder.jp/contests/*/tasks/*
// @license     MIT
// ==/UserScript==

(function () {

    var h3s = document.querySelectorAll('h3');
    var constraints = null;

    for(var i = 0;i < h3s.length;i++){
        if(h3s[i].textContent === "制約"){
            constraints = h3s[i].nextElementSibling;
            break;
        }
    }

    if (constraints !== null) {
        constraints.parentNode.removeChild(constraints.previousElementSibling);
        constraints.parentNode.removeChild(constraints);
    }

})();