Remove emote.name

This commit is contained in:
Samuel Elliott 2018-06-10 22:19:59 +01:00
parent be841f0426
commit c02052a982
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
2 changed files with 10 additions and 6 deletions

View File

@ -58,8 +58,12 @@ export default new class EmoteModule {
if ((index % 10000) === 0)
await Utils.wait();
const uri = emote.type === 2 ? 'https://cdn.betterttv.net/emote/:id/1x' : emote.type === 1 ? 'https://cdn.frankerfacez.com/emoticon/:id/1' : 'https://static-cdn.jtvnw.net/emoticons/v1/:id/1.0';
emote.name = emote.id;
const uri = emote.type === 2 ? 'https://cdn.betterttv.net/emote/:id/1x'
: emote.type === 1 ? 'https://cdn.frankerfacez.com/emoticon/:id/1'
: 'https://static-cdn.jtvnw.net/emoticons/v1/:id/1.0';
// emote.id is the emote's name
// emote.src is the emote's URL
emote.src = uri.replace(':id', emote.value.id || emote.value);
this.emotes.set(emote.id, emote);
}
@ -123,7 +127,7 @@ export default new class EmoteModule {
newMarkup.push(VueInjector.createReactElement(EmoteComponent, {
src: emote.src,
name: emote.name,
name: emote.id,
hasWrapper: /;[\w]+;/gmi.test(word)
}));

View File

@ -8,12 +8,12 @@
* LICENSE file in the root directory of this source tree.
*/
import { FileUtils, ClientLogger as Logger, ClientIPC } from 'common';
import Settings from './settings';
import { DOM } from 'ui';
import filewatcher from 'filewatcher';
import { FileUtils, ClientLogger as Logger, ClientIPC } from 'common';
import path from 'path';
import electron from 'electron';
import filewatcher from 'filewatcher';
import Settings from './settings';
/**
* Custom css editor communications