Time Limit Emphasizer

AtCoderで問題の実行時間制限が2 secでない場合にちょっと主張を激しくする。

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Time Limit Emphasizer
// @namespace   https://github.com/Ogtsn99
// @version      1.2
// @description AtCoderで問題の実行時間制限が2 secでない場合にちょっと主張を激しくする。
// @include     https://atcoder.jp/contests/*/tasks/*
// @auther Ogtsn99
// ==/UserScript==
var pTags = document.getElementsByTagName("p");
var length = pTags.length;
for (var i = 0; i < length; i++) {
  if (pTags[i].textContent.match(/実行時間制限:.*メモリ制限:.*/)) {
    var str = pTags[i].textContent.split(' ');
    if(str[1] !== '2'){
        pTags[i].innerHTML = str[0] + '<span style="color: red; font-size: 28px; "> ' + str[1] + '</span>' + ' ' + str[2] + ' ' + str[3] + ' ' + str[4] + ' ' + str[5] + ' ' + str[6];
    }
    break;
  }
}