Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 32: | Zeile 32: | ||
node.style.backgroundColor = "#c5e8c9"; | node.style.backgroundColor = "#c5e8c9"; | ||
} | } | ||
else if (currentText == " | else if (currentText == "Teilweise Erwfüllt") { | ||
node.style.backgroundColor = "#f7e1b2"; | |||
} | |||
else if (currentText == "Eher nicht Erfüllt") { | |||
node.style.backgroundColor = "#e9c4c4"; | node.style.backgroundColor = "#e9c4c4"; | ||
} | } | ||
else if (currentText == " | else if (currentText == "Nicht Erfüllt") { | ||
node.style.backgroundColor = "#e9c4c4"; | node.style.backgroundColor = "#e9c4c4"; | ||
} | } | ||
Zeile 41: | Zeile 44: | ||
node.style.backgroundColor = "#d2d2d2"; | node.style.backgroundColor = "#d2d2d2"; | ||
} | } | ||
} | } |
Version vom 13. März 2023, 12:24 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
document.body.classList.add( 'mw-rcfilters-ui-initialized' );
}
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'RecentChanges' ) {
document.body.classList.add( 'mw-rcfilters-ui-initialized' );
}
/*BITV tabelle*/
var allTableCells = document.getElementById("bitv").getElementsByTagName("td");
for( var i = 0; i < allTableCells.length; i++ ) {
var node = allTableCells[i];
//get the text from the first child node - which should be a text node
var currentText = node.childNodes[0].nodeValue;
currentText = currentText.trim();
//check for 'one' and assign this table cell's background color accordingly
if (currentText == "Erfüllt") {
node.style.backgroundColor = "#c5e8c9";
}
if (currentText == "Eher Erfüllt") {
node.style.backgroundColor = "#c5e8c9";
}
else if (currentText == "Teilweise Erwfüllt") {
node.style.backgroundColor = "#f7e1b2";
}
else if (currentText == "Eher nicht Erfüllt") {
node.style.backgroundColor = "#e9c4c4";
}
else if (currentText == "Nicht Erfüllt") {
node.style.backgroundColor = "#e9c4c4";
}
else if (currentText == "Nicht anwendbar") {
node.style.backgroundColor = "#d2d2d2";
}
}