Add emoji completion.

This commit is contained in:
eal 2017-09-19 22:43:20 +03:00
parent 91991e2ac1
commit 2162ef20b0
4 changed files with 31 additions and 5 deletions

View file

@ -102,3 +102,13 @@ window.fetch('/static/terms-of-service.html')
.then((html) => {
store.dispatch('setOption', { name: 'tos', value: html })
})
window.fetch('/static/emoji.txt')
.then((res) => res.text())
.then((csv) => {
const emoji = csv.split('\n').map((row) => {
const values = row.split(', ')
return { shortcode: values[0], url: values[1] }
})
store.dispatch('setOption', { name: 'emoji', value: emoji })
})