mirror of https://github.com/jpanther/congo.git
1 line
554 B
JavaScript
1 line
554 B
JavaScript
|
function switchHomeLayout(){const e=document.getElementById("page"),t=document.getElementById("profile"),n=document.querySelectorAll("code[id=layout]");e.style.display==="none"?(e.style.display="block",t.style.display="none",n.forEach(function(e){e.innerText="page"})):(e.style.display="none",t.style.display="block",n.forEach(function(e){e.innerText="profile"}))}window.addEventListener("DOMContentLoaded",e=>{document.querySelectorAll("#switch-layout-button").forEach(e=>e.addEventListener("click",function(e){e.preventDefault(),switchHomeLayout()}))})
|