emotesjs 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -58,7 +58,7 @@ class EmotesJS {
|
|
|
58
58
|
let name = emote.data.name
|
|
59
59
|
let url = `https:${emote.data.host.url}`
|
|
60
60
|
|
|
61
|
-
if (!this.allowedOrigins
|
|
61
|
+
if (!url.includes(this.allowedOrigins)) {
|
|
62
62
|
continue
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -74,8 +74,15 @@ class EmotesJS {
|
|
|
74
74
|
|
|
75
75
|
parse(text) {
|
|
76
76
|
if (!text || !this.isReady) {
|
|
77
|
+
console.log('emotes not ready')
|
|
77
78
|
return text
|
|
78
79
|
}
|
|
80
|
+
|
|
81
|
+
if (this.isReady && this.cachedEmotes.size === 0) {
|
|
82
|
+
console.log('no emotes loaded')
|
|
83
|
+
return text
|
|
84
|
+
}
|
|
85
|
+
|
|
79
86
|
let words = text.split(' ')
|
|
80
87
|
|
|
81
88
|
let fullText = ''
|