diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-08-07 12:41:09 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-08-07 12:41:09 -0700 |
commit | d3272efef7687d08d5c2a36b27328771db522f37 (patch) | |
tree | 69fa6ee6943f6169bf53b9a2fdd966192454c0d1 /ext/bg/js/dictionary.js | |
parent | 024ec83251d05b966ceeb90fd1a531b36567b31b (diff) |
Get rid of addon hack
Diffstat (limited to 'ext/bg/js/dictionary.js')
-rw-r--r-- | ext/bg/js/dictionary.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/ext/bg/js/dictionary.js b/ext/bg/js/dictionary.js index 073b8f55..f312796d 100644 --- a/ext/bg/js/dictionary.js +++ b/ext/bg/js/dictionary.js @@ -44,29 +44,13 @@ class Dictionary { results = results.concat( indices.map(index => { const [e, r, t, ...g] = dict.d[index]; - const tags = t.split(' '); - - // - // TODO: Handle addons through data. - // - - const addons = []; - for (let tag of tags) { - if (tag.startsWith('v5') && tag !== 'v5') { - addons.push('v5'); - } else if (tag.startsWith('vs-')) { - addons.push('vs'); - } - } - return { - id: index, expression: e, reading: r, + tags: t.split(' '), glossary: g, - tags: tags.concat(addons), entities: dict.e, - addons: addons + id: index }; }) ); |