@@ -29,6 +29,7 @@ function Hallway (sites) {
30 <div id='sidebar'>
30 <div id='sidebar'>
31 <ul id='channels'>
31 <ul id='channels'>
32+ <li onclick='filter("")' class='${hallway.filter === '' ? 'selected' : ''}'><a href='#'>hallway <span class='right'>${entries.length}</span></a></li>
32 ${Object.keys(channels).reduce((acc, val, id) => { return acc + `<li onclick='filter("${val}")' class='${hallway.filter === val ? 'selected' : ''}'><a href='#${val}'>${val} <span class='right'>${channels[val]}</span></a></li>\n` }, '')}
33 ${Object.keys(channels).reduce((acc, val, id) => { return acc + `<li onclick='filter("${val}")' class='${hallway.filter === val ? 'selected' : ''}'><a href='#${val}'>${val} <span class='right'>${channels[val]}</span></a></li>\n` }, '')}
34 <ul id='users'>
35 <ul id='users'>
@@ -88,18 +89,10 @@ function Hallway (sites) {
88 if (words[id].substr(0, 4) === 'http') { links.push(words[id]) }
89 if (words[id].substr(0, 4) === 'http') { links.push(words[id]) }
91− for (const id in users) {
92− entry.body = entry.body.replace(users[id], `<span class='user'>${users[id]}</span>`)
92+ for (const id in users) { entry.body = entry.body.replace(users[id], `<span class='user'>${users[id]}</span>`) }
94− for (const id in channels) {
95− entry.body = entry.body.replace(channels[id], `<span class='channel'>${channels[id]}</span>`)
93+ for (const id in channels) { entry.body = entry.body.replace(channels[id], `<span class='channel'>${channels[id]}</span>`) }
97− for (const id in tags) {
98− entry.body = entry.body.replace(tags[id], `<span class='tag'>${tags[id]}</span>`)
94+ for (const id in tags) { entry.body = entry.body.replace(tags[id], `<span class='tag'>${tags[id]}</span>`) }
100− for (const id in links) {
101− entry.body = entry.body.replace(links[id], `<a href='${links[id]}'>${links[id].replace('https://', '').replace('http://', '')}</a>`)
95+ for (const id in links) { entry.body = entry.body.replace(links[id], `<a href='${links[id]}'>${links[id].replace('https://', '').replace('http://', '')}</a>`) }
104 const filter = window.location.hash.substr(1).replace(/\+/g, ' ').toLowerCase()
97 const filter = window.location.hash.substr(1).replace(/\+/g, ' ').toLowerCase()
105 const highlight = filter === entry.author.toLowerCase()
98 const highlight = filter === entry.author.toLowerCase()
@@ -171,7 +164,7 @@ function Hallway (sites) {
171 const isYesterday = yesterday.toDateString() === date.toDateString()
164 const isYesterday = yesterday.toDateString() === date.toDateString()
173 if (seconds < 5) {
166 if (seconds < 5) {
174− return 'now'
167+ return 'just now'
175 } else if (seconds < 60) {
168 } else if (seconds < 60) {
176 return `${seconds} seconds ago`
169 return `${seconds} seconds ago`
177 } else if (seconds < 90) {
170 } else if (seconds < 90) {