MediaWiki:Minerva.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3: Line 3:
// Template:TLP drawer
// Template:TLP drawer


function TLPExpand(x) {
function TLPExpand(w) {
   var y = document.getElementById(x);
   var x = document.getElementById(w);
   var z = document.getElementById("tlp-button-text-"+x);
   var y = "tlp-button-text-".concat(w);
   if (y.style.display === "block") {
  var z = document.getElementById(y);
     y.style.display = "none";
   if (x.style.display === "block") {
     x.style.display = "none";
     z.innerHTML = "Expand";
     z.innerHTML = "Expand";
   } else {
   } else {
     y.style.display = "block";
     x.style.display = "block";
     z.innerHTML = "Collapse";
     z.innerHTML = "Collapse";
   }
   }
}
}