on master help sign in
Merge branch 'master' into patch-2
commit1e1931dbe357910b1aa485b89fc7d64676e92da6 authorDevine Lu Linvega <aliceffekt@gmail.com> dateSat 18 Jan 2020, 10:05 (7 years ago) parent291db9e2d1bdfb
2 files changed+21−20
scripts/hallway.js+6−2 scripts/sites.js+15−18
scripts/hallway.js+6−2
@@ -171,8 +171,8 @@ function Hallway (sites) {
171171 const parts = line.replace(' ', '\t').split('\t')
172172 const date = parts[0].trim()
173173 const body = escapeHtml(parts[1].trim()).trim()
174− const channel = body.substr(0, 1) === '/' ? body.split(' ')[0].substr(1).toLowerCase() : body.substr(0, 1) === '@' ? 'veranda' : 'lobby'
175− const tags = (body.match(reTag) || []).map(a => a.substr(a.indexOf('#') + 1).toLowerCase())
174+ const channel = body.substr(0, 1) === '/' ? cleanTags(body.split(' ')[0].substr(1).toLowerCase()) : body.substr(0, 1) === '@' ? 'veranda' : 'lobby'
175+ const tags = (body.match(reTag) || []).map(a => cleanTags(a.substr(a.indexOf('#') + 1).toLowerCase()))
176176 const offset = new Date() - new Date(date)
177177 entries.push({ date, body, author, offset, channel, tags })
178178 }
@@ -215,6 +215,10 @@ function escapeHtml (unsafe) {
215215 return unsafe.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;')
216216}
217217
218+function cleanTags (unsafe){
219+ return unsafe.replace(/([^a-z0-9]+)/gi, '-')
220+}
221+
218222function stripHash (hash) {
219223 const decoded = decodeURIComponent(hash)
220224 return decoded.charAt(0) === '#' ? decoded.substring(1) : decoded
scripts/sites.js+15−18
@@ -59,16 +59,6 @@ const sites = [
5959 wiki: 'https://liamcooke.com/merveilles/wiki.ndtl'
6060 },
6161
62− {
63− author: 'electricgecko',
64− contact: 'desk@electricgecko.de',
65− langs: ['de', 'en'],
66− title: 'electricgecko',
67− rss: 'https://electricgecko.de/feed',
68− type: 'blog',
69− url: 'https://electricgecko.de'
70− },
71−
7262 {
7363 langs: ['en'],
7464 url: 'https://hraew.autophagy.io'
@@ -100,11 +90,6 @@ const sites = [
10090 url: 'https://heracl.es'
10191 },
10292
103− {
104− langs: ['en'],
105− url: 'http://luminghao.com'
106− },
107−
10893 {
10994 langs: ['en'],
11095 url: 'https://turelio.github.io'
@@ -164,7 +149,11 @@ const sites = [
164149 },
165150
166151 {
152+ author: 'Paloma Kop',
153+ contact: 'doubleobelisk@gmail.com',
167154 langs: ['en'],
155+ title: 'palomakop.tv',
156+ type: 'portfolio',
168157 url: 'https://palomakop.tv'
169158 },
170159
@@ -791,7 +780,7 @@ const sites = [
791780 type: 'hybrid',
792781 url: 'https://estfyr.net'
793782 },
794−
783+
795784 {
796785 author: 'Payson Wallach',
797786 contact: 'payson@paysonwallach.com',
@@ -799,7 +788,7 @@ const sites = [
799788 langs: ['en'],
800789 url: 'https://paysonwallach.com'
801790 },
802−
791+
803792 {
804793 author: 'icco',
805794 contact: 'nat@natwelch.com',
@@ -808,7 +797,7 @@ const sites = [
808797 type: 'portfolio',
809798 url: 'https://natwelch.com'
810799 },
811−
800+
812801 {
813802 author: 'whtrbt',
814803 contact: 'pi@benjamin.gray.land',
@@ -824,6 +813,14 @@ const sites = [
824813 langs: ['en'],
825814 url: 'https://aklsh.github.io',
826815 type: 'hybrid'
816+ },
817+
818+ {
819+ author: 'hxii',
820+ contact: 'paul@glushak.net',
821+ langs: ['en'],
822+ type: 'hybrid',
823+ url: 'https://paulglushak.com'
827824 }
828825]
829826