sample erase

サンプルを消します

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         sample erase
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  サンプルを消します
// @author       imomo
// @match        https://atcoder.jp/contests/*/tasks/*
// @grant        none
// ==/UserScript==

 window.onload = function(){
     var elements = document.getElementsByClassName("lang-ja")[0];
     for(var i = elements.children.length - 1;0<=i;i--){
         if(elements.children[i].className === "io-style")break;
         else elements.removeChild(elements.children[i]);
     }
     elements.appendChild(document.createElement("hr"));
     var alertText = document.createElement("h3");
     alertText.innerHTML="<span style='color: red;'>スクリプトでサンプルを非表示にしています。<br>バチャ終了後このスクリプトをオフにしてください</span>";
     elements.appendChild(alertText);
 }