-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathezmoji.js
329 lines (325 loc) ยท 18.2 KB
/
ezmoji.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
/*!
* Ezmoji v0.7.0
* (c) 2019 Michael Arakilian
* Released under the MIT License.
*/
var ezmoji = {}
ezmoji.list = {
"smile": { "code": ":smile:", "emoji": "๐" },
"laughing": { "code": ":laughing:", "emoji": "๐" },
"blush": { "code": ":blush:", "emoji": "๐" },
"smiley": { "code": ":smiley:", "emoji": "๐" },
"relaxed": { "code": ":relaxed:", "emoji": "๐" },
"smirk": { "code": ":smirk:", "emoji": "๐" },
"heart_eyes": { "code": ":heart_eyes:", "emoji": "๐" },
"kissing_heart": { "code": ":kissing_heart:", "emoji": "๐" },
"kissing_eyes_closed": { "code": ":kissing_eyes_closed:", "emoji": "๐" },
"flushed": { "code": ":flushed:", "emoji": "๐ณ" },
"relieved": { "code": ":relieved:", "emoji": "๐" },
"satisfied": { "code": ":satisfied:", "emoji": "๐" },
"grin": { "code": ":grin:", "emoji": "๐" },
"wink": { "code": ":wink:", "emoji": "๐" },
"stuck_out_tongue_winking_eye": { "code": ":stuck_out_tongue_winking_eye:", "emoji": "๐" },
"stuck_out_tongue_closed_eye": { "code": ":stuck_out_tongue_closed_eye:", "emoji": "๐" },
"grinning": { "code": ":grinning:", "emoji": "๐" },
"kissing": { "code": ":kissing:", "emoji": "๐" },
"kissing_smiling_eyes": { "code": ":kissing_smiling_eyes:", "emoji": "๐" },
"stuck_out_tongue": { "code": ":stuck_out_tongue:", "emoji": "๐" },
"sleeping": { "code": ":sleeping:", "emoji": "๐ด" },
"worried": { "code": ":worried:", "emoji": "๐" },
"frowning": { "code": ":frowning:", "emoji": "๐ฆ" },
"anguished": { "code": ":anguished:", "emoji": "๐ง" },
"open_mouth": { "code": ":open_mouth:", "emoji": "๐ฎ" },
"grimacing": { "code": ":grimacing:", "emoji": "๐ฌ" },
"confused": { "code": ":confused:", "emoji": "๐" },
"hushed": { "code": ":hushed:", "emoji": "๐ฏ" },
"expressionless": { "code": ":expressionless:", "emoji": "๐" },
"unamused": { "code": ":unamused:", "emoji": "๐" },
"sweat_smile": { "code": ":sweat_smile:", "emoji": "๐
" },
"sweat": { "code": ":sweat:", "emoji": "๐" },
"disappionted_relieved": { "code": ":disappionted_relieved:", "emoji": "๐ฅ" },
"weary": { "code": ":weary:", "emoji": "๐ฉ" },
"pensive": { "code": ":pensive:", "emoji": "๐" },
"disappionted": { "code": ":disappionted:", "emoji": "๐" },
"confounded": { "code": ":confounded:", "emoji": "๐" },
"fearful": { "code": ":fearful:", "emoji": "๐จ" },
"cold_sweat": { "code": ":cold_sweat:", "emoji": "๐ฐ" },
"persevere": { "code": ":persevere:", "emoji": "๐ฃ" },
"cry": { "code": ":cry:", "emoji": "๐ข" },
"sob": { "code": ":sob:", "emoji": "๐ญ" },
"joy": { "code": ":joy:", "emoji": "๐" },
"astonished": { "code": ":astonished:", "emoji": "๐ฒ" },
"scream": { "code": ":scream:", "emoji": "๐ฑ" },
"tired_face": { "code": ":tired_face:", "emoji": "๐ซ" },
"angry": { "code": ":angry:", "emoji": "๐ " },
"rage": { "code": ":rage:", "emoji": "๐ก" },
"triumph": { "code": ":triumph:", "emoji": "๐ค" },
"sleepy": { "code": ":sleepy:", "emoji": "๐ช" },
"yum": { "code": ":yum:", "emoji": "๐" },
"mask": { "code": ":mask:", "emoji": "๐ท" },
"sunglasses": { "code": ":sunglasses:", "emoji": "๐" },
"dizzy_face": { "code": ":dizzy_face:", "emoji": "๐ต" },
"imp": { "code": ":imp:", "emoji": "๐ฟ" },
"smiling_imp": { "code": ":smiling_imp:", "emoji": "๐" },
"neutral_face": { "code": ":neutral_face:", "emoji": "๐" },
"no_mouth": { "code": ":no_mouth:", "emoji": "๐ถ" },
"innocent": { "code": ":innocent:", "emoji": "๐" },
"alien": { "code": ":alien:", "emoji": "๐ฝ" },
"yellow_heart": { "code": ":yellow_heart:", "emoji": "๐" },
"blue_heart": { "code": ":blue_heart:", "emoji": "๐" },
"purple_heart": { "code": ":purple_heart:", "emoji": "๐" },
"heart": { "code": ":heart:", "emoji": "โค๏ธ" },
"green_heart": { "code": ":green_heart:", "emoji": "๐" },
"broken_heart": { "code": ":broken_heart:", "emoji": "๐" },
"heartbeat": { "code": ":heartbeat:", "emoji": "๐" },
"heartpulse": { "code": ":heartpulse:", "emoji": "๐" },
"two_hearts": { "code": ":two_hearts:", "emoji": "๐" },
"revolving_hearts": { "code": ":revolving_hearts:", "emoji": "๐" },
"cupid": { "code": ":cupid:", "emoji": "๐" },
"sparkling_heart": { "code": ":sparkling_heart:", "emoji": "๐" },
"sparkles": { "code": ":sparkles:", "emoji": "โจ" },
"star": { "code": ":star:", "emoji": "โญ๏ธ" },
"star2": { "code": ":star2:", "emoji": "๐" },
"dizzy": { "code": ":dizzy:", "emoji": "๐ซ" },
"boom": { "code": ":boom:", "emoji": "๐ฅ" },
"collision": { "code": ":collision:", "emoji": "๐ฅ" },
"anger": { "code": ":anger:", "emoji": "๐ข" },
"exclamation": { "code": ":exclamation:", "emoji": "โ๏ธ" },
"question": { "code": ":question:", "emoji": "โ" },
"grey_exclamation": { "code": ":grey_exclamation:", "emoji": "โ" },
"grey_question": { "code": ":grey_question:", "emoji": "โ" },
"zzz": { "code": ":zzz:", "emoji": "๐ค" },
"dash": { "code": ":dash:", "emoji": "๐จ" },
"sweat_drops": { "code": ":sweat_drops:", "emoji": "๐ฆ" },
"notes": { "code": ":notes:", "emoji": "๐ถ" },
"musical_note": { "code": ":musical_note:", "emoji": "๐ต" },
"fire": { "code": ":fire:", "emoji": "๐ฅ" },
"hankey": { "code": ":hankey:", "emoji": "๐ฉ" },
"poop": { "code": ":poop:", "emoji": "๐ฉ" },
"shit": { "code": ":shit:", "emoji": "๐ฉ" },
"plusone": { "code": ":+1:", "emoji": "๐" },
"thumbsup": { "code": ":thumbsup:", "emoji": "๐" },
"minusone": { "code": ":-1:", "emoji": "๐" },
"thumbsdown": { "code": ":thumbsdown:", "emoji": "๐" },
"ok_hand": { "code": ":ok_hand:", "emoji": "๐" },
"punch": { "code": ":punch:", "emoji": "๐" },
"facepunch": { "code": ":facepunch:", "emoji": "๐" },
"fist": { "code": ":fist:", "emoji": "โ" },
"v": { "code": ":v:", "emoji": "โ๏ธ" },
"wave": { "code": ":wave:", "emoji": "๐" },
"hand": { "code": ":hand:", "emoji": "โ" },
"raised_hand": { "code": ":raised_hand:", "emoji": "โ" },
"open_hands": { "code": ":open_hands:", "emoji": "๐" },
"point_up": { "code": ":point_up:", "emoji": "โ๏ธ" },
"point_down": { "code": ":point_down:", "emoji": "๐" },
"point_left": { "code": ":point_left:", "emoji": "๐" },
"point_right": { "code": ":point_right:", "emoji": "๐" },
"raised_hands": { "code": ":raised_hands:", "emoji": "๐" },
"pray": { "code": ":pray:", "emoji": "๐" },
"point_up_2": { "code": ":point_up_2:", "emoji": "๐" },
"clap": { "code": ":clap:", "emoji": "๐" },
"muscle": { "code": ":muscle:", "emoji": "๐ช" },
"metal": { "code": ":metal:", "emoji": "๐ค" },
"fu": { "code": ":fu:", "emoji": "๐" },
"walking": { "code": ":walking:", "emoji": "๐ถ" },
"runner": { "code": ":runner:", "emoji": "๐" },
"running": { "code": ":running:", "emoji": "๐" },
"couple": { "code": ":couple:", "emoji": "๐ซ" },
"family": { "code": ":family:", "emoji": "๐ช" },
"two_men_holding_hands": { "code": ":two_men_holding_hands:", "emoji": "๐ฌ" },
"two_women_holding_hands": { "code": ":two_women_holding_hands:", "emoji": "๐ญ" },
"dancer": { "code": ":dancer:", "emoji": "๐" },
"dancers": { "code": ":dancers:", "emoji": "๐ฏ" },
"ok_woman": { "code": ":ok_woman:", "emoji": "๐" },
"no_good": { "code": ":no_good:", "emoji": "๐
" },
"information_desk_person": { "code": ":information_desk_person:", "emoji": "๐" },
"raising_hand": { "code": ":raising_hand:", "emoji": "๐" },
"bride_with_veil": { "code": ":bride_with_veil:", "emoji": "๐ฐ" },
"person_with_pouting_face": { "code": ":person_with_pouting_face:", "emoji": "๐" },
"person_frowning": { "code": ":person_frowning:", "emoji": "๐" },
"bow": { "code": ":bow:", "emoji": "๐" },
"couplekiss": { "code": ":couplekiss:", "emoji": "๐" },
"couple_with_heart": { "code": ":couple_with_heart:", "emoji": "๐" },
"massage": { "code": ":massage:", "emoji": "๐" },
"haircut": { "code": ":haircut:", "emoji": "๐" },
"nail_care": { "code": ":nail_care:", "emoji": "๐
" },
"boy": { "code": ":boy:", "emoji": "๐ฆ" },
"girl": { "code": ":girl:", "emoji": "๐ง" },
"woman": { "code": ":woman:", "emoji": "๐ฉ" },
"man": { "code": ":man:", "emoji": "๐จ" },
"baby": { "code": ":baby:", "emoji": "๐ถ" },
"older_woman": { "code": ":older_woman:", "emoji": "๐ต" },
"older_man": { "code": ":older_man:", "emoji": "๐ด" },
"person_with_blond_hair": { "code": ":person_with_blond_hair:", "emoji": "๐ฑ" },
"man_with_gua_pi_mao": { "code": ":man_with_gua_pi_mao:", "emoji": "๐ฒ" },
"man_with_turban": { "code": ":man_with_turban:", "emoji": "๐ณ" },
"construction_worker": { "code": ":construction_worker:", "emoji": "๐ท" },
"cop": { "code": ":cop:", "emoji": "๐ฎ" },
"angel": { "code": ":angel:", "emoji": "๐ผ" },
"princess": { "code": ":princess:", "emoji": "๐ธ" },
"smiley_cat": { "code": ":smiley_cat:", "emoji": "๐บ" },
"smile_cat": { "code": ":smile_cat:", "emoji": "๐ธ" },
"heart_eyes_cat": { "code": ":heart_eyes_cat:", "emoji": "๐ป" },
"kissing_cat": { "code": ":kissing_cat:", "emoji": "๐ฝ" },
"smirk_cat": { "code": ":smirk_cat:", "emoji": "๐ผ" },
"scream_cat": { "code": ":scream_cat:", "emoji": "๐" },
"crying_cat_face": { "code": ":crying_cat_face:", "emoji": "๐ฟ" },
"joy_cat": { "code": ":joy_cat:", "emoji": "๐น" },
"pouting_cat": { "code": ":pouting_cat:", "emoji": "๐พ" },
"japanese_ogre": { "code": ":japanese_ogre:", "emoji": "๐น" },
"japanese_goblin": { "code": ":japanese_goblin:", "emoji": "๐บ" },
"see_no_evil": { "code": ":see_no_evil:", "emoji": "๐" },
"hear_no_evil": { "code": ":hear_no_evil:", "emoji": "๐" },
"speak_no_evil": { "code": ":speak_no_evil:", "emoji": "๐" },
"guardsman": { "code": ":guardsman:", "emoji": "๐" },
"skull": { "code": ":skull:", "emoji": "๐" },
"feet": { "code": ":feet:", "emoji": "๐พ" },
"lips": { "code": ":lips:", "emoji": "๐" },
"kiss": { "code": ":kiss:", "emoji": "๐" },
"droplet": { "code": ":droplet:", "emoji": "๐ง" },
"ear": { "code": ":ear:", "emoji": "๐" },
"eyes": { "code": ":eyes:", "emoji": "๐" },
"nose": { "code": ":nose:", "emoji": "๐" },
"tongue": { "code": ":tongue:", "emoji": "๐
" },
"love_letter": { "code": ":love_letter:", "emoji": "๐" },
"bust_in_silhouette": { "code": ":bust_in_silhouette:", "emoji": "๐ค" },
"busts_in_silhouette": { "code": ":busts_in_silhouette:", "emoji": "๐ฅ" },
"speech_balloon": { "code": ":speech_balloon:", "emoji": "๐ฌ" },
"thought_balloon": { "code": ":thought_balloon:", "emoji": "๐ญ" },
"sunny": { "code": ":sunny:", "emoji": "โ๏ธ" },
"umbrella": { "code": ":umbrella:", "emoji": "โ๏ธ" },
"cloud": { "code": ":cloud:", "emoji": "โ๏ธ" },
"snowflake": { "code": ":snowflake:", "emoji": "โ๏ธ" },
"snowman": { "code": ":snowman:", "emoji": "โ๏ธ" },
"zap": { "code": ":zap:", "emoji": "โก๏ธ" },
"cyclone": { "code": ":cyclone:", "emoji": "๐" },
"foggy": { "code": ":foggy:", "emoji": "๐" },
"ocean": { "code": ":ocean:", "emoji": "๐" },
"cat": { "code": ":cat:", "emoji": "๐ฑ" },
"dog": { "code": ":dog:", "emoji": "๐ถ" },
"mouse": { "code": ":mouse:", "emoji": "๐ญ" },
"hamster": { "code": ":hamster:", "emoji": "๐น" },
"rabbit": { "code": ":rabbit:", "emoji": "๐ฐ" },
"wolf": { "code": ":wolf:", "emoji": "๐บ" },
"frog": { "code": ":frog:", "emoji": "๐ธ" },
"tiger": { "code": ":tiger:", "emoji": "๐ฏ" },
"koala": { "code": ":koala:", "emoji": "๐จ" },
"bear": { "code": ":bear:", "emoji": "๐ป" },
"pig": { "code": ":pig:", "emoji": "๐ท" },
"pig_nose": { "code": ":pig_nose:", "emoji": "๐ฝ" },
"cow": { "code": ":cow:", "emoji": "๐ฎ" },
"boar": { "code": ":boar:", "emoji": "๐" },
"monkey_face": { "code": ":monkey_face:", "emoji": "๐ต" },
"monkey": { "code": ":monkey:", "emoji": "๐" },
"horse": { "code": ":horse:", "emoji": "๐ด" },
"racehorse": { "code": ":racehorse:", "emoji": "๐" },
"camel": { "code": ":camel:", "emoji": "๐ซ" },
"sheep": { "code": ":sheep:", "emoji": "๐" },
"elephant": { "code": ":elephant:", "emoji": "๐" },
"panda_face": { "code": ":panda_face:", "emoji": "๐ผ" },
"snake": { "code": ":snake:", "emoji": "๐" },
"bird": { "code": ":bird:", "emoji": "๐ฆ" },
"baby_chick": { "code": ":baby_chick:", "emoji": "๐ค" },
"hatched_chick": { "code": ":hatched_chick:", "emoji": "๐ฅ" },
"hatching_chick": { "code": ":hatching_chick:", "emoji": "๐ฃ" },
"chicken": { "code": ":chicken:", "emoji": "๐" },
"penguin": { "code": ":penguin:", "emoji": "๐ง" },
"turtle": { "code": ":turtle:", "emoji": "๐ข" },
"bug": { "code": ":bug:", "emoji": "๐" },
"honeybee": { "code": ":honeybee:", "emoji": "๐" },
"ant": { "code": ":ant:", "emoji": "๐" },
"beetle": { "code": ":beetle:", "emoji": "๐" },
"snail": { "code": ":snail:", "emoji": "๐" },
"octopus": { "code": ":octopus:", "emoji": "๐" },
"tropical_fish": { "code": ":tropical_fish:", "emoji": "๐ " },
"fish": { "code": ":fish:", "emoji": "๐" },
"whale": { "code": ":whale:", "emoji": "๐ณ" },
"whale2": { "code": ":whale2:", "emoji": "๐" },
"dolphin": { "code": ":dolphin:", "emoji": "๐ฌ" },
"cow2": { "code": ":cow2:", "emoji": "๐" },
"ram": { "code": ":ram:", "emoji": "๐" },
"rat": { "code": ":rat:", "emoji": "๐" },
"water_buffalo": { "code": ":water_buffalo:", "emoji": "๐" },
"tiger2": { "code": ":tiger2:", "emoji": "๐
" },
"rabbit2": { "code": ":rabbit2:", "emoji": "๐" },
"dragon": { "code": ":dragon:", "emoji": "๐" },
"goat": { "code": ":goat:", "emoji": "๐" },
"rooster": { "code": ":rooster:", "emoji": "๐" },
"dog2": { "code": ":dog2:", "emoji": "๐" },
"pig2": { "code": ":pig2:", "emoji": "๐" },
"mouse2": { "code": ":mouse2:", "emoji": "๐" },
"ox": { "code": ":ox:", "emoji": "๐" },
"dragon_face": { "code": ":dragon_face:", "emoji": "๐ฒ" },
"blowfish": { "code": ":blowfish:", "emoji": "๐ก" },
"crocodile": { "code": ":crocodile:", "emoji": "๐" },
"dromedary_camel": { "code": ":dromedary_camel:", "emoji": "๐ช" },
"leopard": { "code": ":leopard:", "emoji": "๐" },
"cat2": { "code": ":cat2:", "emoji": "๐" },
"poodle": { "code": ":poodle:", "emoji": "๐ฉ" },
"paw_prints": { "code": ":paw_prints:", "emoji": "๐พ" },
"bouquet": { "code": ":bouquet:", "emoji": "๐" },
"cherry_blossom": { "code": ":cherry_blossom:", "emoji": "๐ธ" },
"tulip": { "code": ":tulip:", "emoji": "๐ท" },
"four_leaf_clover": { "code": ":four_leaf_clover:", "emoji": "๐" },
"rose": { "code": ":rose:", "emoji": "๐น" },
"sunflower": { "code": ":sunflower:", "emoji": "๐ป" },
"hibiscus": { "code": ":hibiscus:", "emoji": "๐บ" },
"maple_leaf": { "code": ":maple_leaf:", "emoji": "๐" },
"leaves": { "code": ":leaves:", "emoji": "๐" },
"fallen_leaf": { "code": ":fallen_leaf:", "emoji": "๐" },
"herb": { "code": ":herb:", "emoji": "๐ฟ" },
"mushroom": { "code": ":mushroom:", "emoji": "๐" },
"cactus": { "code": ":cactus:", "emoji": "๐ต" },
"palm_tree": { "code": ":palm_tree:", "emoji": "๐ด" },
"evergreen_tree": { "code": ":evergreen_tree:", "emoji": "๐ฒ" },
"deciduous_tree": { "code": ":deciduous_tree:", "emoji": "๐ณ" },
"chestnut": { "code": ":chestnut:", "emoji": "๐ฐ" },
"seedling": { "code": ":seedling:", "emoji": "๐ฑ" },
"blossom": { "code": ":blossom:", "emoji": "๐ผ" },
"ear_of_rice": { "code": ":ear_of_rice:", "emoji": "๐พ" },
"shell": { "code": ":shell:", "emoji": "๐" },
"globe_with_meridians": { "code": ":globe_with_meridians:", "emoji": "๐" },
"sun_with_face": { "code": ":sun_with_face:", "emoji": "๐" },
"full_moon_with_face": { "code": ":full_moon_with_face:", "emoji": "๐" },
"new_moon_with_face": { "code": ":new_moon_with_face:", "emoji": "๐" },
"new_moon": { "code": ":new_moon:", "emoji": "๐" },
"waxing_crescent_moon": { "code": ":waxing_crescent_moon:", "emoji": "๐" },
"first_quarter_moon": { "code": ":first_quarter_moon:", "emoji": "๐" },
"waxing_gibbous_moon": { "code": ":waxing_gibbous_moon:", "emoji": "๐" },
"full_moon": { "code": ":full_moon:", "emoji": "๐" },
"waning_gibbous_moon": { "code": ":waning_gibbous_moon:", "emoji": "๐" },
"last_quarter_moon": { "code": ":last_quarter_moon:", "emoji": "๐" },
"waning_crescent_moon": { "code": ":waning_crescent_moon:", "emoji": "๐" },
"last_quarter_moon_with_face": { "code": ":last_quarter_moon_with_face:", "emoji": "๐" },
"first_quarter_moon_with_face": { "code": ":first_quarter_moon_with_face:", "emoji": "๐" },
"moon": { "code": ":moon:", "emoji": "๐" },
"earth_africa": { "code": ":earth_africa:", "emoji": "๐" },
"earth_americas": { "code": ":earth_americas:", "emoji": "๐" },
"earth_asia": { "code": ":earth_asia:", "emoji": "๐" },
"volcano": { "code": ":volcano:", "emoji": "๐" },
"milky_way": { "code": ":milky_way:", "emoji": "๐" },
"partly_sunny": { "code": ":partly_sunny:", "emoji": "โ
๏ธ" },
"bowtie": { "code": ":bowtie:", "emoji": "๐" }
}
ezmoji.check = function(node) {
for (var emoji in ezmoji.list) {
if(node.innerText.includes(ezmoji.list[emoji].code)) {
var nstr = node.innerHTML.replace(
ezmoji.list[emoji].code,
ezmoji.list[emoji].emoji
)
return node.innerHTML = nstr
}
}
}
ezmoji.init = function(node) {
var nodes = node.childNodes
for (var i = 0; i < nodes.length; i++) {
if(!nodes[i]) { continue }
if(nodes[i].childNodes.length > 0) {
ezmoji.init(nodes[i])
ezmoji.check(nodes[i])
}
}
}
window.addEventListener("load", ezmoji.init(document))