MediaWiki:Cycle11.js: Difference between revisions
miraheze>CodeTriangle switch min shareholder to bold + no underline |
miraheze>CodeTriangle no parking for bob |
||
| Line 20: | Line 20: | ||
// Code to generate a hover-over indication of percentages. | // Code to generate a hover-over indication of percentages. | ||
for (let row of st.children) { | for (let row of st.children) { | ||
// The cell that contains the entity's name. | |||
let ent = row.children[0]; | |||
let ch = row.children[i]; | let ch = row.children[i]; | ||
if (!isNaN(ch.innerText)) { | if (!isNaN(ch.innerText)) { | ||
| Line 25: | Line 27: | ||
let majority = percent > 0.5; | let majority = percent > 0.5; | ||
let minority = majority ? false : percent >= 0.1; | let minority = majority ? false : percent >= 0.1; | ||
// But the BoB cannot be a shareholder at all. | |||
if (ent.innerText.match(/Bureau/)) { | |||
majority = minority = false; | |||
} | |||
ch.setAttribute( | ch.setAttribute( | ||
"title", | "title", | ||