MediaWiki:Minerva.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 58: Line 58:
   }
   }
}
}
/*const TLPPropositions = ["1",
"2",
"3",
"4",
"5",
"6",
"7",
"1.1",
"1.2",
"2.1",
"2.2",
"3.1",
"3.2",
"3.3",
"3.4",
"3.5",
"4.1",
"4.2",
"4.3",
"4.4",
"4.5",
"5.1",
"5.2",
"5.3",
"5.4",
"5.5",
"5.6",
"6.1",
"6.2",
"6.3",
"6.4",
"6.5",
"1.11",
"1.12",
"1.13",
"1.21",
"2.01",
"2.02",
"2.03",
"2.04",
"2.05",
"2.06",
"2.11",
"2.12",
"2.13",
"2.14",
"2.15",
"2.16",
"2.17",
"2.18",
"2.19",
"2.21",
"2.22",
"3.01",
"3.02",
"3.03",
"3.04",
"3.05",
"3.11",
"3.12",
"3.13",
"3.14",
"3.21",
"3.22",
"3.23",
"3.24",
"3.25",
"3.26",
"3.31",
"3.32",
"3.33",
"3.34",
"3.41",
"3.42",
"4.01",
"4.02",
"4.03",
"4.04",
"4.05",
"4.06",
"4.11",
"4.12",
"4.21",
"4.22",
"4.23",
"4.24",
"4.25",
"4.26",
"4.27",
"4.28",
"4.31",
"4.41",
"4.42",
"4.43",
"4.44",
"4.45",
"4.46",
"4.51",
"4.52",
"4.53",
"5.01",
"5.02",
"5.11",
"5.12",
"5.13",
"5.14",
"5.15",
"5.21",
"5.22",
"5.23",
"5.24",
"5.25",
"5.31",
"5.32",
"5.41",
"5.42",
"5.43",
"5.44",
"5.45",
"5.46",
"5.47",
"5.51",
"5.52",
"5.53",
"5.54",
"5.55",
"5.61",
"5.62",
"5.63",
"5.64",
"6.01",
"6.02",
"6.03",
"6.11",
"6.12",
"6.13",
"6.21",
"6.22",
"6.23",
"6.24",
"6.31",
"6.32",
"6.33",
"6.34",
"6.35",
"6.36",
"6.37",
"6.41",
"6.42",
"6.43",
"6.44",
"6.45",
"6.51",
"6.52",
"6.53",
"6.54",
"2.011",
"2.012",
"2.013",
"2.014",
"2.021",
"2.022",
"2.023",
"2.024",
"2.025",
"2.026",
"2.027",
"2.031",
"2.032",
"2.033",
"2.034",
"2.061",
"2.062",
"2.063",
"2.131",
"2.141",
"2.151",
"2.161",
"2.171",
"2.172",
"2.173",
"2.174",
"2.181",
"2.182",
"2.201",
"2.202",
"2.203",
"2.221",
"2.222",
"2.223",
"2.224",
"2.225",
"3.001",
"3.031",
"3.032",
"3.141",
"3.142",
"3.143",
"3.144",
"3.201",
"3.202",
"3.203",
"3.221",
"3.251",
"3.261",
"3.262",
"3.263",
"3.311",
"3.312",
"3.313",
"3.314",
"3.315",
"3.316",
"3.317",
"3.318",
"3.321",
"3.322",
"3.323",
"3.324",
"3.325",
"3.326",
"3.327",
"3.328",
"3.331",
"3.332",
"3.333",
"3.334",
"3.341",
"3.342",
"3.343",
"3.344",
"3.411",
"4.001",
"4.002",
"4.003",
"4.011",
"4.012",
"4.013",
"4.014",
"4.015",
"4.016",
"4.021",
"4.022",
"4.023",
"4.024",
"4.025",
"4.026",
"4.027",
"4.031",
"4.032",
"4.041",
"4.061",
"4.062",
"4.063",
"4.064",
"4.111",
"4.112",
"4.113",
"4.114",
"4.115",
"4.116",
"4.121",
"4.122",
"4.123",
"4.124",
"4.125",
"4.126",
"4.127",
"4.128",
"4.211",
"4.221",
"4.241",
"4.242",
"4.243",
"4.411",
"4.431",
"4.441",
"4.442",
"4.461",
"4.462",
"4.463",
"4.464",
"4.465",
"4.466",
"5.101",
"5.121",
"5.122",
"5.123",
"5.124",
"5.131",
"5.132",
"5.133",
"5.134",
"5.135",
"5.136",
"5.141",
"5.142",
"5.143",
"5.151",
"5.152",
"5.153",
"5.154",
"5.155",
"5.156",
"5.231",
"5.232",
"5.233",
"5.234",
"5.241",
"5.242",
"5.251",
"5.252",
"5.253",
"5.254",
"5.441",
"5.442",
"5.451",
"5.452",
"5.453",
"5.454",
"5.461",
"5.471",
"5.472",
"5.473",
"5.474",
"5.475",
"5.476",
"5.501",
"5.502",
"5.503",
"5.511",
"5.512",
"5.513",
"5.514",
"5.515",
"5.521",
"5.522",
"5.523",
"5.524",
"5.525",
"5.526",
"5.531",
"5.532",
"5.533",
"5.534",
"5.535",
"5.541",
"5.542",
"5.551",
"5.552",
"5.553",
"5.554",
"5.555",
"5.556",
"5.557",
"5.621",
"5.631",
"5.632",
"5.633",
"5.634",
"5.641",
"6.001",
"6.002",
"6.021",
"6.022",
"6.031",
"6.111",
"6.112",
"6.113",
"6.121",
"6.122",
"6.123",
"6.124",
"6.125",
"6.126",
"6.127",
"6.211",
"6.231",
"6.232",
"6.233",
"6.234",
"6.241",
"6.321",
"6.341",
"6.342",
"6.343",
"6.361",
"6.362",
"6.363",
"6.371",
"6.372",
"6.373",
"6.374",
"6.375",
"6.421",
"6.422",
"6.423",
"6.431",
"6.432",
"6.521",
"6.522",
"2.0121",
"2.0122",
"2.0123",
"2.0124",
"2.0131",
"2.0141",
"2.0201",
"2.0211",
"2.0212",
"2.0231",
"2.0232",
"2.0233",
"2.0251",
"2.0271",
"2.0272",
"2.1511",
"2.1512",
"2.1513",
"2.1514",
"2.1515",
"3.0321",
"3.1431",
"3.1432",
"3.3411",
"3.3421",
"3.3441",
"3.3442",
"4.0031",
"4.0141",
"4.0311",
"4.0312",
"4.0411",
"4.0412",
"4.0621",
"4.0641",
"4.1121",
"4.1122",
"4.1211",
"4.1212",
"4.1213",
"4.1221",
"4.1241",
"4.1251",
"4.1252",
"4.1271",
"4.1272",
"4.1273",
"4.1274",
"4.2211",
"4.4611",
"4.4661",
"5.1241",
"5.1311",
"5.1361",
"5.1362",
"5.1363",
"5.1511",
"5.2341",
"5.2521",
"5.2522",
"5.2523",
"5.4541",
"5.4611",
"5.4711",
"5.4731",
"5.4732",
"5.4733",
"5.5151",
"5.5261",
"5.5262",
"5.5301",
"5.5302",
"5.5303",
"5.5321",
"5.5351",
"5.5352",
"5.5421",
"5.5422",
"5.5423",
"5.5521",
"5.5541",
"5.5542",
"5.5561",
"5.5562",
"5.5563",
"5.5571",
"5.6331",
"6.1201",
"6.1202",
"6.1203",
"6.1221",
"6.1222",
"6.1223",
"6.1224",
"6.1231",
"6.1232",
"6.1233",
"6.1251",
"6.1261",
"6.1262",
"6.1263",
"6.1264",
"6.1265",
"6.1271",
"6.2321",
"6.2322",
"6.2323",
"6.2331",
"6.2341",
"6.3211",
"6.3431",
"6.3432",
"6.3611",
"6.3631",
"6.3751",
"6.4311",
"6.4312",
"6.4321",
"2.01231",
"2.02331",
"2.15121",
"4.12721",
"5.47321",
"6.36111",
"6.36311"];
function TLPExpandAll() {
 
  function TLPExpandOne(x) {
    var y = "tlp-children-".concat(x); //outputs something like "tlp-children-1.21"
    var z = document.getElementById(y); //outputs something like document.getElementById("tlp-children-1.21")
    var a = "tlp-button-text-".concat(x); //outputs something like "tlp-button-text-1.21"
    var b = document.getElementById(a); //outputs something like document.getElementById("tlp-button-text-1.21")
    z.style.display = "block";
    b.innerHTML = "Collapse";
  }
  TLPPropositions.forEach(TLPExpandOne);
}
function TLPCollapseAll() {
 
  function TLPCollapseOne(x) {
    var y = "tlp-children-".concat(x); //outputs something like "tlp-children-1.21"
    var z = document.getElementById(y); //outputs something like document.getElementById("tlp-children-1.21")
    var a = "tlp-button-text-".concat(x); //outputs something like "tlp-button-text-1.21"
    var b = document.getElementById(a); //outputs something like document.getElementById("tlp-button-text-1.21")
    z.style.display = "none";
    b.innerHTML = "Expand";
  }
 
  TLPPropositions.forEach(TLPCollapseOne);
}*/