Zuletzt bearbeitet vor 11 Monaten
von Margit Link-Rodrigue

MediaWiki:Common.js: Unterschied zwischen den Versionen

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 22: Zeile 22:


/*BITV tabelle*/
/*BITV tabelle*/
var table = document.getElementById("bitv");
var cells = document.getElementById("bitv").getElementsByTagName("td");
for (var i = 0, row; row = table.rows[i]; i++) {
for (var i = 0; i < cells.length; i++) {
for (var j = 0, cell; cell = row.cells[j]; j++) {
    if (cells[i].innerHTML == "Erfüllt") {
if (cell.innerText == '') {
        cells[i].style.backgroundColor = "red";
cell.style.backgroundColor = 'RGBA(85,83,108,0.4)';
    }
}else if (cell.innerText = Erfüllt) {
cell.style.backgroundColor = 'RGBA(170,214,136,0.4)';
}else if (cell.innerText > 15 && cell.innerText <=20) {
cell.style.backgroundColor = 'RGBA(170,214,136,0.4)';
}else if (cell.innerText > 20 && cell.innerText <=25) {
cell.style.backgroundColor = 'RGBA(152,195,119,0.6)';
}else if (cell.innerText > 25 && cell.innerText <=30) {
cell.style.backgroundColor = 'RGBA(139,189,120,0.9)';
}else if (cell.innerText > 30 && cell.innerText <=60) {
cell.style.backgroundColor = 'RGBA(94,167,88,0.9)';
}else if (cell.innerText > 60 && cell.innerText <=150) {
cell.style.backgroundColor = 'RGBA(88,157,65,0.3)';
}else if (cell.innerText > 150 && cell.innerText <=10000) {
cell.style.backgroundColor = 'RGBA(95,160,97,0.6)';
}else if (cell.innerText > 10000 && cell.innerText <=20000) {
cell.style.backgroundColor = 'RGBA(105,170,90,0.7)';
}else if (cell.innerText > 20000 && cell.innerText <=30000) {
cell.style.backgroundColor = 'RGBA(115,164,76,0.6)';
}else if (cell.innerText > 30000) {
cell.style.backgroundColor = 'RGBA(98,143,94,0.4)';
}
}
}
}

Version vom 10. März 2023, 16:38 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' );
}

/*Target based tabs*/
var hashLinks = document.querySelectorAll("a[href^='#']");
[].forEach.call(hashLinks, function (link) {
  link.addEventListener("click", function (event) {
    event.preventDefault();
    history.pushState({}, "", link.href);
    
    // Update the URL again with the same hash, then go back
    history.pushState({}, "", link.href);
    history.back();
  });
});


/*BITV tabelle*/
var cells = document.getElementById("bitv").getElementsByTagName("td");
for (var i = 0; i < cells.length; i++) {
    if (cells[i].innerHTML == "Erfüllt") {
        cells[i].style.backgroundColor = "red";
    }
}
Keine Kategorien vergebenBearbeiten