User:Bettervector/timeless.js

var header = document.getElementById('mw-header');

var userMenu = document.createElement('input'); userMenu.className = 'userMenu'; userMenu.type = "checkbox"; userMenu.name = "name"; userMenu.value = "value"; userMenu.id = "userMenu";

header.appendChild(userMenu); var userDrawer = document.getElementById('mw-site-navigation');

userMenu.onchange = function { userDrawer.style.display = this.checked ? 'block' : 'none'; document.body.addClassName = 'singlecol'; };