Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 19: | Zeile 19: | ||
}); | }); | ||
}); | }); | ||
/*BITV tabelle*/ | |||
var t = document.getElementById('bitv'); | |||
if(t) { | |||
Array.from(t.rows).forEach((tr, rowIdx) => { | |||
Array.from(tr.cells).forEach((cell, cellIdx) => { | |||
if (cell.innerText == '') { | |||
cell.style.backgroundColor = 'RGBA(85,83,108,0.4)'; | |||
}else if (cell.innerText = 0) { | |||
cell.style.backgroundColor = 'red'; | |||
}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, 08:41 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 t = document.getElementById('bitv');
if(t) {
Array.from(t.rows).forEach((tr, rowIdx) => {
Array.from(tr.cells).forEach((cell, cellIdx) => {
if (cell.innerText == '') {
cell.style.backgroundColor = 'RGBA(85,83,108,0.4)';
}else if (cell.innerText = 0) {
cell.style.backgroundColor = 'red';
}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)';
}
});
});
}