From 2162ef20b0d00a098c9968ca6c141bccd5efb29f Mon Sep 17 00:00:00 2001 From: eal Date: Tue, 19 Sep 2017 22:43:20 +0300 Subject: Add emoji completion. --- src/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index d1f99fa5..a13569d6 100644 --- a/src/main.js +++ b/src/main.js @@ -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 }) + }) -- cgit v1.2.3-70-g09d2