Zuletzt bearbeitet vor einem Jahr
von Margit Link-Rodrigue

MediaWiki:Common.js: Unterschied zwischen den Versionen

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 9: Zeile 9:
/*BITV tabelle*/
/*BITV tabelle*/


var allTableCells = document.getElementsByClassName("wikitable")[0].getElementsByTagName("td");
var allTableCells = document.getElementById("bitv").getElementsByTagName("td");




for(var i = 0; i < allTableCells.length; i++) {
for( var i = 0; i < allTableCells.length; i++ ) {


var node = allTableCells[i];
var node = allTableCells[i];
Zeile 20: Zeile 20:


var currentText = node.childNodes[0].nodeValue;
var currentText = node.childNodes[0].nodeValue;
currentText = currentText.trim();


//check for 'one' and assign this table cell's background color accordingly
//check for 'one' and assign this table cell's background color accordingly


if (currentText === "5.2")
if (currentText == "5.2") {


node.style.backgroundColor = "red";
node.style.backgroundColor = "red";
}


}
}

Version vom 13. März 2023, 11:13 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 == "5.2") {

node.style.backgroundColor = "red";

}

}
Keine Kategorien vergebenBearbeiten