Sum

adds ul and dl

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

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

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 Sum
// @namespace Violentmonkey Scripts
// @match http://192.168.23.1:90/FTZX.html
// @grant none
// @locale de
// @description adds ul and dl
// @version 004
// ==/UserScript==

var dl = document.getElementsByClassName("sp3")[0].innerHTML;
var ul = document.getElementsByClassName("sp3")[1].innerHTML;
var dlval = dl.split(" ");
var ulval = ul.split(" ");
var gesammt = parseFloat(dlval[2]) + parseFloat(ulval[2]);
document.getElementsByClassName("sp1")[0].innerHTML = gesammt.toFixed(1) + "<br><span style=\"color:red; font-size:small;\">" + (9000 - gesammt).toFixed(1) + "</span>";
var dieTRs = document.getElementsByTagName("tr");
for (var y in dieTRs) {
    var dieTDs = dieTRs[y].getElementsByTagName("td");
    for (var z in dieTDs) {
        if (z == 0) {
            if (dieTDs[z].innerHTML.toString().match('104|15[012345]')) {
                dieTRs[y].style.background = "#faf";
            }
        }
    }
}