User:Zackmann08/language-collapse.js

// // Get an element by xpath: https://stackoverflow.com/questions/10596417/is-there-a-way-to-get-element-by-xpath-using-javascript-in-selenium-webdriver/14284815 // function getElementByXpath(path) { //  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; // }

// getElementByXpath("//*[@id='p-lang']/div").classList.add('content'); // document.getElementById("p-lang").classList.add('collapsible');

// var coll = document.getElementsByClassName("collapsible"); // var i;

// for (i = 0; i < coll.length; i++) { //  coll[i].addEventListener("click", function { //     this.classList.toggle("active"); //     var content = this.nextElementSibling; //     if (content.style.display === "block") { //       content.style.display = "none"; //     } else { //       content.style.display = "block"; //     } //   }); // }