var login = document.createElement('div');
login.innerHTML = '<a role="button" id="login" class="show">Log in</a>';
sidebar.insertBefore(login, sidebar.firstChild);
- $('#login').on('click', function(e) {
+ $('#login').on('click', e => {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/login');
- xhr.onload = function () {
+ xhr.onload = () => {
if(this.status != 200)
return;
var username = this.responseText;