MediaWiki:Mobile.js: Difference between revisions

no edit summary
(Created page with "→‎All JavaScript here will be loaded for users of the mobile site: mw.loader.using('mobile.site.styles');")
 
No edit summary
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the mobile site */
/* All JavaScript here will be loaded for users of the mobile site */
mw.loader.using('mobile.site.styles');
mw.loader.using('mobile.site.styles');
function toggleReferences() {
  var x = document.getElementById("content");
  var y = x.getElementsByClassName("reference");
  var i;
  for (i = 0; i < y.length; i++) {
    if (y[i].style.display === "none") {
      y[i].style.display = "inline";
    } else {
      y[i].style.display = "none";
    }
  }
  var z = x.getElementsByClassName("mw-references-wrap");
  var i;
  for (i = 0; i < z.length; i++) {
    if (z[i].style.display === "none") {
      z[i].style.display = "inline";
    } else {
      z[i].style.display = "none";
    }
  }
}