User:Wanderer/dolphin.js

let collapseSidebarBtn = document.createElement("button"); collapseSidebarBtn.setAttribute("id", "collapse-sidebar-btn"); document.body.appendChild(collapseSidebarBtn);

collapseSidebarBtn.addEventListener("click", function (evt) { document.body.classList.toggle("collapse-sidebar"); });