/* global $, ws */ "use strict"; const log = console.log; // eslint-disable-line ws.onmessage = socket => { const data = JSON.parse(socket.data); switch (true) { case data.message === "updated html": $(data.selector).html(data.html); $("#emailMessage").val(""); break; case data.message === "notification": // TODO: Make work with appending so multiple notifications can be sent $("#flash-container").html(`