hw07_chatSmiles.js 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  1. const socket = io("http://localhost:4000");
  2. // const socket = io("http://192.168.1.217:4000/");
  3. users = []; // кто тут в чате
  4. // let smiles = {};
  5. // for (let smile of document.querySelectorAll(".emoji")) {
  6. // smiles[smile.nextElementSibling.innerText] = smile.getAttribute("data-src");
  7. // }
  8. // smilesJson = JSON.stringify(smiles,null,4);
  9. let smileObj = {
  10. 100: "graphics/emojis/100.png",
  11. 1234: "graphics/emojis/1234.png",
  12. bowtie: "graphics/emojis/bowtie.png",
  13. smile: "graphics/emojis/smile.png",
  14. simple_smile: "graphics/emojis/simple_smile.png",
  15. laughing: "graphics/emojis/laughing.png",
  16. blush: "graphics/emojis/blush.png",
  17. smiley: "graphics/emojis/smiley.png",
  18. relaxed: "graphics/emojis/relaxed.png",
  19. smirk: "graphics/emojis/smirk.png",
  20. heart_eyes: "graphics/emojis/heart_eyes.png",
  21. kissing_heart: "graphics/emojis/kissing_heart.png",
  22. kissing_closed_eyes: "graphics/emojis/kissing_closed_eyes.png",
  23. flushed: "graphics/emojis/flushed.png",
  24. relieved: "graphics/emojis/relieved.png",
  25. satisfied: "graphics/emojis/satisfied.png",
  26. grin: "graphics/emojis/grin.png",
  27. wink: "graphics/emojis/wink.png",
  28. stuck_out_tongue_winking_eye: "graphics/emojis/stuck_out_tongue_winking_eye.png",
  29. stuck_out_tongue_closed_eyes: "graphics/emojis/stuck_out_tongue_closed_eyes.png",
  30. grinning: "graphics/emojis/grinning.png",
  31. kissing: "graphics/emojis/kissing.png",
  32. kissing_smiling_eyes: "graphics/emojis/kissing_smiling_eyes.png",
  33. stuck_out_tongue: "graphics/emojis/stuck_out_tongue.png",
  34. sleeping: "graphics/emojis/sleeping.png",
  35. worried: "graphics/emojis/worried.png",
  36. frowning: "graphics/emojis/frowning.png",
  37. anguished: "graphics/emojis/anguished.png",
  38. open_mouth: "graphics/emojis/open_mouth.png",
  39. grimacing: "graphics/emojis/grimacing.png",
  40. confused: "graphics/emojis/confused.png",
  41. hushed: "graphics/emojis/hushed.png",
  42. expressionless: "graphics/emojis/expressionless.png",
  43. unamused: "graphics/emojis/unamused.png",
  44. sweat_smile: "graphics/emojis/sweat_smile.png",
  45. sweat: "graphics/emojis/sweat.png",
  46. disappointed_relieved: "graphics/emojis/disappointed_relieved.png",
  47. weary: "graphics/emojis/weary.png",
  48. pensive: "graphics/emojis/pensive.png",
  49. disappointed: "graphics/emojis/disappointed.png",
  50. confounded: "graphics/emojis/confounded.png",
  51. fearful: "graphics/emojis/fearful.png",
  52. cold_sweat: "graphics/emojis/cold_sweat.png",
  53. persevere: "graphics/emojis/persevere.png",
  54. cry: "graphics/emojis/cry.png",
  55. sob: "graphics/emojis/sob.png",
  56. joy: "graphics/emojis/joy.png",
  57. astonished: "graphics/emojis/astonished.png",
  58. scream: "graphics/emojis/scream.png",
  59. neckbeard: "graphics/emojis/neckbeard.png",
  60. tired_face: "graphics/emojis/tired_face.png",
  61. angry: "graphics/emojis/angry.png",
  62. rage: "graphics/emojis/rage.png",
  63. triumph: "graphics/emojis/triumph.png",
  64. sleepy: "graphics/emojis/sleepy.png",
  65. yum: "graphics/emojis/yum.png",
  66. mask: "graphics/emojis/mask.png",
  67. sunglasses: "graphics/emojis/sunglasses.png",
  68. dizzy_face: "graphics/emojis/dizzy_face.png",
  69. imp: "graphics/emojis/imp.png",
  70. smiling_imp: "graphics/emojis/smiling_imp.png",
  71. neutral_face: "graphics/emojis/neutral_face.png",
  72. no_mouth: "graphics/emojis/no_mouth.png",
  73. innocent: "graphics/emojis/innocent.png",
  74. alien: "graphics/emojis/alien.png",
  75. yellow_heart: "graphics/emojis/yellow_heart.png",
  76. blue_heart: "graphics/emojis/blue_heart.png",
  77. purple_heart: "graphics/emojis/purple_heart.png",
  78. heart: "graphics/emojis/heart.png",
  79. green_heart: "graphics/emojis/green_heart.png",
  80. broken_heart: "graphics/emojis/broken_heart.png",
  81. heartbeat: "graphics/emojis/heartbeat.png",
  82. heartpulse: "graphics/emojis/heartpulse.png",
  83. two_hearts: "graphics/emojis/two_hearts.png",
  84. revolving_hearts: "graphics/emojis/revolving_hearts.png",
  85. cupid: "graphics/emojis/cupid.png",
  86. sparkling_heart: "graphics/emojis/sparkling_heart.png",
  87. sparkles: "graphics/emojis/sparkles.png",
  88. star: "graphics/emojis/star.png",
  89. star2: "graphics/emojis/star2.png",
  90. dizzy: "graphics/emojis/dizzy.png",
  91. boom: "graphics/emojis/boom.png",
  92. collision: "graphics/emojis/collision.png",
  93. anger: "graphics/emojis/anger.png",
  94. exclamation: "graphics/emojis/exclamation.png",
  95. question: "graphics/emojis/question.png",
  96. grey_exclamation: "graphics/emojis/grey_exclamation.png",
  97. grey_question: "graphics/emojis/grey_question.png",
  98. zzz: "graphics/emojis/zzz.png",
  99. dash: "graphics/emojis/dash.png",
  100. sweat_drops: "graphics/emojis/sweat_drops.png",
  101. notes: "graphics/emojis/notes.png",
  102. musical_note: "graphics/emojis/musical_note.png",
  103. fire: "graphics/emojis/fire.png",
  104. hankey: "graphics/emojis/hankey.png",
  105. poop: "graphics/emojis/poop.png",
  106. shit: "graphics/emojis/shit.png",
  107. "+1": "graphics/emojis/plus1.png",
  108. thumbsup: "graphics/emojis/thumbsup.png",
  109. "-1": "graphics/emojis/-1.png",
  110. thumbsdown: "graphics/emojis/thumbsdown.png",
  111. ok_hand: "graphics/emojis/ok_hand.png",
  112. punch: "graphics/emojis/punch.png",
  113. facepunch: "graphics/emojis/facepunch.png",
  114. fist: "graphics/emojis/fist.png",
  115. v: "graphics/emojis/v.png",
  116. wave: "graphics/emojis/wave.png",
  117. hand: "graphics/emojis/hand.png",
  118. raised_hand: "graphics/emojis/raised_hand.png",
  119. open_hands: "graphics/emojis/open_hands.png",
  120. point_up: "graphics/emojis/point_up.png",
  121. point_down: "graphics/emojis/point_down.png",
  122. point_left: "graphics/emojis/point_left.png",
  123. point_right: "graphics/emojis/point_right.png",
  124. raised_hands: "graphics/emojis/raised_hands.png",
  125. pray: "graphics/emojis/pray.png",
  126. point_up_2: "graphics/emojis/point_up_2.png",
  127. clap: "graphics/emojis/clap.png",
  128. muscle: "graphics/emojis/muscle.png",
  129. metal: "graphics/emojis/metal.png",
  130. fu: "graphics/emojis/fu.png",
  131. runner: "graphics/emojis/runner.png",
  132. running: "graphics/emojis/running.png",
  133. couple: "graphics/emojis/couple.png",
  134. family: "graphics/emojis/family.png",
  135. two_men_holding_hands: "graphics/emojis/two_men_holding_hands.png",
  136. two_women_holding_hands: "graphics/emojis/two_women_holding_hands.png",
  137. dancer: "graphics/emojis/dancer.png",
  138. dancers: "graphics/emojis/dancers.png",
  139. ok_woman: "graphics/emojis/ok_woman.png",
  140. no_good: "graphics/emojis/no_good.png",
  141. information_desk_person: "graphics/emojis/information_desk_person.png",
  142. raising_hand: "graphics/emojis/raising_hand.png",
  143. bride_with_veil: "graphics/emojis/bride_with_veil.png",
  144. person_with_pouting_face: "graphics/emojis/person_with_pouting_face.png",
  145. person_frowning: "graphics/emojis/person_frowning.png",
  146. bow: "graphics/emojis/bow.png",
  147. couplekiss: "graphics/emojis/couplekiss.png",
  148. couple_with_heart: "graphics/emojis/couple_with_heart.png",
  149. massage: "graphics/emojis/massage.png",
  150. haircut: "graphics/emojis/haircut.png",
  151. nail_care: "graphics/emojis/nail_care.png",
  152. boy: "graphics/emojis/boy.png",
  153. girl: "graphics/emojis/girl.png",
  154. woman: "graphics/emojis/woman.png",
  155. man: "graphics/emojis/man.png",
  156. baby: "graphics/emojis/baby.png",
  157. older_woman: "graphics/emojis/older_woman.png",
  158. older_man: "graphics/emojis/older_man.png",
  159. person_with_blond_hair: "graphics/emojis/person_with_blond_hair.png",
  160. man_with_gua_pi_mao: "graphics/emojis/man_with_gua_pi_mao.png",
  161. man_with_turban: "graphics/emojis/man_with_turban.png",
  162. construction_worker: "graphics/emojis/construction_worker.png",
  163. cop: "graphics/emojis/cop.png",
  164. angel: "graphics/emojis/angel.png",
  165. princess: "graphics/emojis/princess.png",
  166. smiley_cat: "graphics/emojis/smiley_cat.png",
  167. smile_cat: "graphics/emojis/smile_cat.png",
  168. heart_eyes_cat: "graphics/emojis/heart_eyes_cat.png",
  169. kissing_cat: "graphics/emojis/kissing_cat.png",
  170. smirk_cat: "graphics/emojis/smirk_cat.png",
  171. scream_cat: "graphics/emojis/scream_cat.png",
  172. crying_cat_face: "graphics/emojis/crying_cat_face.png",
  173. joy_cat: "graphics/emojis/joy_cat.png",
  174. pouting_cat: "graphics/emojis/pouting_cat.png",
  175. japanese_ogre: "graphics/emojis/japanese_ogre.png",
  176. japanese_goblin: "graphics/emojis/japanese_goblin.png",
  177. see_no_evil: "graphics/emojis/see_no_evil.png",
  178. hear_no_evil: "graphics/emojis/hear_no_evil.png",
  179. speak_no_evil: "graphics/emojis/speak_no_evil.png",
  180. guardsman: "graphics/emojis/guardsman.png",
  181. skull: "graphics/emojis/skull.png",
  182. feet: "graphics/emojis/feet.png",
  183. lips: "graphics/emojis/lips.png",
  184. kiss: "graphics/emojis/kiss.png",
  185. droplet: "graphics/emojis/droplet.png",
  186. ear: "graphics/emojis/ear.png",
  187. eyes: "graphics/emojis/eyes.png",
  188. nose: "graphics/emojis/nose.png",
  189. tongue: "graphics/emojis/tongue.png",
  190. love_letter: "graphics/emojis/love_letter.png",
  191. bust_in_silhouette: "graphics/emojis/bust_in_silhouette.png",
  192. busts_in_silhouette: "graphics/emojis/busts_in_silhouette.png",
  193. speech_balloon: "graphics/emojis/speech_balloon.png",
  194. thought_balloon: "graphics/emojis/thought_balloon.png",
  195. feelsgood: "graphics/emojis/feelsgood.png",
  196. finnadie: "graphics/emojis/finnadie.png",
  197. goberserk: "graphics/emojis/goberserk.png",
  198. godmode: "graphics/emojis/godmode.png",
  199. hurtrealbad: "graphics/emojis/hurtrealbad.png",
  200. rage1: "graphics/emojis/rage1.png",
  201. rage2: "graphics/emojis/rage2.png",
  202. rage3: "graphics/emojis/rage3.png",
  203. rage4: "graphics/emojis/rage4.png",
  204. suspect: "graphics/emojis/suspect.png",
  205. trollface: "graphics/emojis/trollface.png",
  206. sunny: "graphics/emojis/sunny.png",
  207. umbrella: "graphics/emojis/umbrella.png",
  208. cloud: "graphics/emojis/cloud.png",
  209. snowflake: "graphics/emojis/snowflake.png",
  210. snowman: "graphics/emojis/snowman.png",
  211. zap: "graphics/emojis/zap.png",
  212. cyclone: "graphics/emojis/cyclone.png",
  213. foggy: "graphics/emojis/foggy.png",
  214. ocean: "graphics/emojis/ocean.png",
  215. cat: "graphics/emojis/cat.png",
  216. dog: "graphics/emojis/dog.png",
  217. mouse: "graphics/emojis/mouse.png",
  218. hamster: "graphics/emojis/hamster.png",
  219. rabbit: "graphics/emojis/rabbit.png",
  220. wolf: "graphics/emojis/wolf.png",
  221. frog: "graphics/emojis/frog.png",
  222. tiger: "graphics/emojis/tiger.png",
  223. koala: "graphics/emojis/koala.png",
  224. bear: "graphics/emojis/bear.png",
  225. pig: "graphics/emojis/pig.png",
  226. pig_nose: "graphics/emojis/pig_nose.png",
  227. cow: "graphics/emojis/cow.png",
  228. boar: "graphics/emojis/boar.png",
  229. monkey_face: "graphics/emojis/monkey_face.png",
  230. monkey: "graphics/emojis/monkey.png",
  231. horse: "graphics/emojis/horse.png",
  232. racehorse: "graphics/emojis/racehorse.png",
  233. camel: "graphics/emojis/camel.png",
  234. sheep: "graphics/emojis/sheep.png",
  235. elephant: "graphics/emojis/elephant.png",
  236. panda_face: "graphics/emojis/panda_face.png",
  237. snake: "graphics/emojis/snake.png",
  238. bird: "graphics/emojis/bird.png",
  239. baby_chick: "graphics/emojis/baby_chick.png",
  240. hatched_chick: "graphics/emojis/hatched_chick.png",
  241. hatching_chick: "graphics/emojis/hatching_chick.png",
  242. chicken: "graphics/emojis/chicken.png",
  243. penguin: "graphics/emojis/penguin.png",
  244. turtle: "graphics/emojis/turtle.png",
  245. bug: "graphics/emojis/bug.png",
  246. honeybee: "graphics/emojis/honeybee.png",
  247. ant: "graphics/emojis/ant.png",
  248. beetle: "graphics/emojis/beetle.png",
  249. snail: "graphics/emojis/snail.png",
  250. octopus: "graphics/emojis/octopus.png",
  251. tropical_fish: "graphics/emojis/tropical_fish.png",
  252. fish: "graphics/emojis/fish.png",
  253. whale: "graphics/emojis/whale.png",
  254. whale2: "graphics/emojis/whale2.png",
  255. dolphin: "graphics/emojis/dolphin.png",
  256. cow2: "graphics/emojis/cow2.png",
  257. ram: "graphics/emojis/ram.png",
  258. rat: "graphics/emojis/rat.png",
  259. water_buffalo: "graphics/emojis/water_buffalo.png",
  260. tiger2: "graphics/emojis/tiger2.png",
  261. rabbit2: "graphics/emojis/rabbit2.png",
  262. dragon: "graphics/emojis/dragon.png",
  263. goat: "graphics/emojis/goat.png",
  264. rooster: "graphics/emojis/rooster.png",
  265. dog2: "graphics/emojis/dog2.png",
  266. pig2: "graphics/emojis/pig2.png",
  267. mouse2: "graphics/emojis/mouse2.png",
  268. ox: "graphics/emojis/ox.png",
  269. dragon_face: "graphics/emojis/dragon_face.png",
  270. blowfish: "graphics/emojis/blowfish.png",
  271. crocodile: "graphics/emojis/crocodile.png",
  272. dromedary_camel: "graphics/emojis/dromedary_camel.png",
  273. leopard: "graphics/emojis/leopard.png",
  274. cat2: "graphics/emojis/cat2.png",
  275. poodle: "graphics/emojis/poodle.png",
  276. paw_prints: "graphics/emojis/paw_prints.png",
  277. bouquet: "graphics/emojis/bouquet.png",
  278. cherry_blossom: "graphics/emojis/cherry_blossom.png",
  279. tulip: "graphics/emojis/tulip.png",
  280. four_leaf_clover: "graphics/emojis/four_leaf_clover.png",
  281. rose: "graphics/emojis/rose.png",
  282. sunflower: "graphics/emojis/sunflower.png",
  283. hibiscus: "graphics/emojis/hibiscus.png",
  284. maple_leaf: "graphics/emojis/maple_leaf.png",
  285. leaves: "graphics/emojis/leaves.png",
  286. fallen_leaf: "graphics/emojis/fallen_leaf.png",
  287. herb: "graphics/emojis/herb.png",
  288. mushroom: "graphics/emojis/mushroom.png",
  289. cactus: "graphics/emojis/cactus.png",
  290. palm_tree: "graphics/emojis/palm_tree.png",
  291. evergreen_tree: "graphics/emojis/evergreen_tree.png",
  292. deciduous_tree: "graphics/emojis/deciduous_tree.png",
  293. chestnut: "graphics/emojis/chestnut.png",
  294. seedling: "graphics/emojis/seedling.png",
  295. blossom: "graphics/emojis/blossom.png",
  296. ear_of_rice: "graphics/emojis/ear_of_rice.png",
  297. shell: "graphics/emojis/shell.png",
  298. globe_with_meridians: "graphics/emojis/globe_with_meridians.png",
  299. sun_with_face: "graphics/emojis/sun_with_face.png",
  300. full_moon_with_face: "graphics/emojis/full_moon_with_face.png",
  301. new_moon_with_face: "graphics/emojis/new_moon_with_face.png",
  302. new_moon: "graphics/emojis/new_moon.png",
  303. waxing_crescent_moon: "graphics/emojis/waxing_crescent_moon.png",
  304. first_quarter_moon: "graphics/emojis/first_quarter_moon.png",
  305. waxing_gibbous_moon: "graphics/emojis/waxing_gibbous_moon.png",
  306. full_moon: "graphics/emojis/full_moon.png",
  307. waning_gibbous_moon: "graphics/emojis/waning_gibbous_moon.png",
  308. last_quarter_moon: "graphics/emojis/last_quarter_moon.png",
  309. waning_crescent_moon: "graphics/emojis/waning_crescent_moon.png",
  310. last_quarter_moon_with_face: "graphics/emojis/last_quarter_moon_with_face.png",
  311. first_quarter_moon_with_face: "graphics/emojis/first_quarter_moon_with_face.png",
  312. crescent_moon: "graphics/emojis/crescent_moon.png",
  313. earth_africa: "graphics/emojis/earth_africa.png",
  314. earth_americas: "graphics/emojis/earth_americas.png",
  315. earth_asia: "graphics/emojis/earth_asia.png",
  316. volcano: "graphics/emojis/volcano.png",
  317. milky_way: "graphics/emojis/milky_way.png",
  318. partly_sunny: "graphics/emojis/partly_sunny.png",
  319. octocat: "graphics/emojis/octocat.png",
  320. squirrel: "graphics/emojis/squirrel.png",
  321. bamboo: "graphics/emojis/bamboo.png",
  322. gift_heart: "graphics/emojis/gift_heart.png",
  323. dolls: "graphics/emojis/dolls.png",
  324. school_satchel: "graphics/emojis/school_satchel.png",
  325. mortar_board: "graphics/emojis/mortar_board.png",
  326. flags: "graphics/emojis/flags.png",
  327. fireworks: "graphics/emojis/fireworks.png",
  328. sparkler: "graphics/emojis/sparkler.png",
  329. wind_chime: "graphics/emojis/wind_chime.png",
  330. rice_scene: "graphics/emojis/rice_scene.png",
  331. jack_o_lantern: "graphics/emojis/jack_o_lantern.png",
  332. ghost: "graphics/emojis/ghost.png",
  333. santa: "graphics/emojis/santa.png",
  334. christmas_tree: "graphics/emojis/christmas_tree.png",
  335. gift: "graphics/emojis/gift.png",
  336. bell: "graphics/emojis/bell.png",
  337. no_bell: "graphics/emojis/no_bell.png",
  338. tanabata_tree: "graphics/emojis/tanabata_tree.png",
  339. tada: "graphics/emojis/tada.png",
  340. confetti_ball: "graphics/emojis/confetti_ball.png",
  341. balloon: "graphics/emojis/balloon.png",
  342. crystal_ball: "graphics/emojis/crystal_ball.png",
  343. cd: "graphics/emojis/cd.png",
  344. dvd: "graphics/emojis/dvd.png",
  345. floppy_disk: "graphics/emojis/floppy_disk.png",
  346. camera: "graphics/emojis/camera.png",
  347. video_camera: "graphics/emojis/video_camera.png",
  348. movie_camera: "graphics/emojis/movie_camera.png",
  349. computer: "graphics/emojis/computer.png",
  350. tv: "graphics/emojis/tv.png",
  351. iphone: "graphics/emojis/iphone.png",
  352. phone: "graphics/emojis/phone.png",
  353. telephone: "graphics/emojis/telephone.png",
  354. telephone_receiver: "graphics/emojis/telephone_receiver.png",
  355. pager: "graphics/emojis/pager.png",
  356. fax: "graphics/emojis/fax.png",
  357. minidisc: "graphics/emojis/minidisc.png",
  358. vhs: "graphics/emojis/vhs.png",
  359. sound: "graphics/emojis/sound.png",
  360. speaker: "graphics/emojis/speaker.png",
  361. mute: "graphics/emojis/mute.png",
  362. loudspeaker: "graphics/emojis/loudspeaker.png",
  363. mega: "graphics/emojis/mega.png",
  364. hourglass: "graphics/emojis/hourglass.png",
  365. hourglass_flowing_sand: "graphics/emojis/hourglass_flowing_sand.png",
  366. alarm_clock: "graphics/emojis/alarm_clock.png",
  367. watch: "graphics/emojis/watch.png",
  368. radio: "graphics/emojis/radio.png",
  369. satellite: "graphics/emojis/satellite.png",
  370. loop: "graphics/emojis/loop.png",
  371. mag: "graphics/emojis/mag.png",
  372. mag_right: "graphics/emojis/mag_right.png",
  373. unlock: "graphics/emojis/unlock.png",
  374. lock: "graphics/emojis/lock.png",
  375. lock_with_ink_pen: "graphics/emojis/lock_with_ink_pen.png",
  376. closed_lock_with_key: "graphics/emojis/closed_lock_with_key.png",
  377. key: "graphics/emojis/key.png",
  378. bulb: "graphics/emojis/bulb.png",
  379. flashlight: "graphics/emojis/flashlight.png",
  380. high_brightness: "graphics/emojis/high_brightness.png",
  381. low_brightness: "graphics/emojis/low_brightness.png",
  382. electric_plug: "graphics/emojis/electric_plug.png",
  383. battery: "graphics/emojis/battery.png",
  384. calling: "graphics/emojis/calling.png",
  385. email: "graphics/emojis/email.png",
  386. mailbox: "graphics/emojis/mailbox.png",
  387. postbox: "graphics/emojis/postbox.png",
  388. bath: "graphics/emojis/bath.png",
  389. bathtub: "graphics/emojis/bathtub.png",
  390. shower: "graphics/emojis/shower.png",
  391. toilet: "graphics/emojis/toilet.png",
  392. wrench: "graphics/emojis/wrench.png",
  393. nut_and_bolt: "graphics/emojis/nut_and_bolt.png",
  394. hammer: "graphics/emojis/hammer.png",
  395. seat: "graphics/emojis/seat.png",
  396. moneybag: "graphics/emojis/moneybag.png",
  397. yen: "graphics/emojis/yen.png",
  398. dollar: "graphics/emojis/dollar.png",
  399. pound: "graphics/emojis/pound.png",
  400. euro: "graphics/emojis/euro.png",
  401. credit_card: "graphics/emojis/credit_card.png",
  402. money_with_wings: "graphics/emojis/money_with_wings.png",
  403. "e-mail": "graphics/emojis/e-mail.png",
  404. inbox_tray: "graphics/emojis/inbox_tray.png",
  405. outbox_tray: "graphics/emojis/outbox_tray.png",
  406. envelope: "graphics/emojis/envelope.png",
  407. incoming_envelope: "graphics/emojis/incoming_envelope.png",
  408. postal_horn: "graphics/emojis/postal_horn.png",
  409. mailbox_closed: "graphics/emojis/mailbox_closed.png",
  410. mailbox_with_mail: "graphics/emojis/mailbox_with_mail.png",
  411. mailbox_with_no_mail: "graphics/emojis/mailbox_with_no_mail.png",
  412. package: "graphics/emojis/package.png",
  413. door: "graphics/emojis/door.png",
  414. smoking: "graphics/emojis/smoking.png",
  415. bomb: "graphics/emojis/bomb.png",
  416. gun: "graphics/emojis/gun.png",
  417. hocho: "graphics/emojis/hocho.png",
  418. pill: "graphics/emojis/pill.png",
  419. syringe: "graphics/emojis/syringe.png",
  420. page_facing_up: "graphics/emojis/page_facing_up.png",
  421. page_with_curl: "graphics/emojis/page_with_curl.png",
  422. bookmark_tabs: "graphics/emojis/bookmark_tabs.png",
  423. bar_chart: "graphics/emojis/bar_chart.png",
  424. chart_with_upwards_trend: "graphics/emojis/chart_with_upwards_trend.png",
  425. chart_with_downwards_trend: "graphics/emojis/chart_with_downwards_trend.png",
  426. scroll: "graphics/emojis/scroll.png",
  427. clipboard: "graphics/emojis/clipboard.png",
  428. calendar: "graphics/emojis/calendar.png",
  429. date: "graphics/emojis/date.png",
  430. card_index: "graphics/emojis/card_index.png",
  431. file_folder: "graphics/emojis/file_folder.png",
  432. open_file_folder: "graphics/emojis/open_file_folder.png",
  433. scissors: "graphics/emojis/scissors.png",
  434. pushpin: "graphics/emojis/pushpin.png",
  435. paperclip: "graphics/emojis/paperclip.png",
  436. black_nib: "graphics/emojis/black_nib.png",
  437. pencil2: "graphics/emojis/pencil2.png",
  438. straight_ruler: "graphics/emojis/straight_ruler.png",
  439. triangular_ruler: "graphics/emojis/triangular_ruler.png",
  440. closed_book: "graphics/emojis/closed_book.png",
  441. green_book: "graphics/emojis/green_book.png",
  442. blue_book: "graphics/emojis/blue_book.png",
  443. orange_book: "graphics/emojis/orange_book.png",
  444. notebook: "graphics/emojis/notebook.png",
  445. notebook_with_decorative_cover: "graphics/emojis/notebook_with_decorative_cover.png",
  446. ledger: "graphics/emojis/ledger.png",
  447. books: "graphics/emojis/books.png",
  448. bookmark: "graphics/emojis/bookmark.png",
  449. name_badge: "graphics/emojis/name_badge.png",
  450. microscope: "graphics/emojis/microscope.png",
  451. telescope: "graphics/emojis/telescope.png",
  452. newspaper: "graphics/emojis/newspaper.png",
  453. football: "graphics/emojis/football.png",
  454. basketball: "graphics/emojis/basketball.png",
  455. soccer: "graphics/emojis/soccer.png",
  456. baseball: "graphics/emojis/baseball.png",
  457. tennis: "graphics/emojis/tennis.png",
  458. "8ball": "graphics/emojis/8ball.png",
  459. rugby_football: "graphics/emojis/rugby_football.png",
  460. bowling: "graphics/emojis/bowling.png",
  461. golf: "graphics/emojis/golf.png",
  462. mountain_bicyclist: "graphics/emojis/mountain_bicyclist.png",
  463. bicyclist: "graphics/emojis/bicyclist.png",
  464. horse_racing: "graphics/emojis/horse_racing.png",
  465. snowboarder: "graphics/emojis/snowboarder.png",
  466. swimmer: "graphics/emojis/swimmer.png",
  467. surfer: "graphics/emojis/surfer.png",
  468. ski: "graphics/emojis/ski.png",
  469. spades: "graphics/emojis/spades.png",
  470. hearts: "graphics/emojis/hearts.png",
  471. clubs: "graphics/emojis/clubs.png",
  472. diamonds: "graphics/emojis/diamonds.png",
  473. gem: "graphics/emojis/gem.png",
  474. ring: "graphics/emojis/ring.png",
  475. trophy: "graphics/emojis/trophy.png",
  476. musical_score: "graphics/emojis/musical_score.png",
  477. musical_keyboard: "graphics/emojis/musical_keyboard.png",
  478. violin: "graphics/emojis/violin.png",
  479. space_invader: "graphics/emojis/space_invader.png",
  480. video_game: "graphics/emojis/video_game.png",
  481. black_joker: "graphics/emojis/black_joker.png",
  482. flower_playing_cards: "graphics/emojis/flower_playing_cards.png",
  483. game_die: "graphics/emojis/game_die.png",
  484. dart: "graphics/emojis/dart.png",
  485. mahjong: "graphics/emojis/mahjong.png",
  486. clapper: "graphics/emojis/clapper.png",
  487. memo: "graphics/emojis/memo.png",
  488. pencil: "graphics/emojis/pencil.png",
  489. book: "graphics/emojis/book.png",
  490. art: "graphics/emojis/art.png",
  491. microphone: "graphics/emojis/microphone.png",
  492. headphones: "graphics/emojis/headphones.png",
  493. trumpet: "graphics/emojis/trumpet.png",
  494. saxophone: "graphics/emojis/saxophone.png",
  495. guitar: "graphics/emojis/guitar.png",
  496. shoe: "graphics/emojis/shoe.png",
  497. sandal: "graphics/emojis/sandal.png",
  498. high_heel: "graphics/emojis/high_heel.png",
  499. lipstick: "graphics/emojis/lipstick.png",
  500. boot: "graphics/emojis/boot.png",
  501. shirt: "graphics/emojis/shirt.png",
  502. tshirt: "graphics/emojis/tshirt.png",
  503. necktie: "graphics/emojis/necktie.png",
  504. womans_clothes: "graphics/emojis/womans_clothes.png",
  505. dress: "graphics/emojis/dress.png",
  506. running_shirt_with_sash: "graphics/emojis/running_shirt_with_sash.png",
  507. jeans: "graphics/emojis/jeans.png",
  508. kimono: "graphics/emojis/kimono.png",
  509. bikini: "graphics/emojis/bikini.png",
  510. ribbon: "graphics/emojis/ribbon.png",
  511. tophat: "graphics/emojis/tophat.png",
  512. crown: "graphics/emojis/crown.png",
  513. womans_hat: "graphics/emojis/womans_hat.png",
  514. mans_shoe: "graphics/emojis/mans_shoe.png",
  515. closed_umbrella: "graphics/emojis/closed_umbrella.png",
  516. briefcase: "graphics/emojis/briefcase.png",
  517. handbag: "graphics/emojis/handbag.png",
  518. pouch: "graphics/emojis/pouch.png",
  519. purse: "graphics/emojis/purse.png",
  520. eyeglasses: "graphics/emojis/eyeglasses.png",
  521. fishing_pole_and_fish: "graphics/emojis/fishing_pole_and_fish.png",
  522. coffee: "graphics/emojis/coffee.png",
  523. tea: "graphics/emojis/tea.png",
  524. sake: "graphics/emojis/sake.png",
  525. baby_bottle: "graphics/emojis/baby_bottle.png",
  526. beer: "graphics/emojis/beer.png",
  527. beers: "graphics/emojis/beers.png",
  528. cocktail: "graphics/emojis/cocktail.png",
  529. tropical_drink: "graphics/emojis/tropical_drink.png",
  530. wine_glass: "graphics/emojis/wine_glass.png",
  531. fork_and_knife: "graphics/emojis/fork_and_knife.png",
  532. pizza: "graphics/emojis/pizza.png",
  533. hamburger: "graphics/emojis/hamburger.png",
  534. fries: "graphics/emojis/fries.png",
  535. poultry_leg: "graphics/emojis/poultry_leg.png",
  536. meat_on_bone: "graphics/emojis/meat_on_bone.png",
  537. spaghetti: "graphics/emojis/spaghetti.png",
  538. curry: "graphics/emojis/curry.png",
  539. fried_shrimp: "graphics/emojis/fried_shrimp.png",
  540. bento: "graphics/emojis/bento.png",
  541. sushi: "graphics/emojis/sushi.png",
  542. fish_cake: "graphics/emojis/fish_cake.png",
  543. rice_ball: "graphics/emojis/rice_ball.png",
  544. rice_cracker: "graphics/emojis/rice_cracker.png",
  545. rice: "graphics/emojis/rice.png",
  546. ramen: "graphics/emojis/ramen.png",
  547. stew: "graphics/emojis/stew.png",
  548. oden: "graphics/emojis/oden.png",
  549. dango: "graphics/emojis/dango.png",
  550. egg: "graphics/emojis/egg.png",
  551. bread: "graphics/emojis/bread.png",
  552. doughnut: "graphics/emojis/doughnut.png",
  553. custard: "graphics/emojis/custard.png",
  554. icecream: "graphics/emojis/icecream.png",
  555. ice_cream: "graphics/emojis/ice_cream.png",
  556. shaved_ice: "graphics/emojis/shaved_ice.png",
  557. birthday: "graphics/emojis/birthday.png",
  558. cake: "graphics/emojis/cake.png",
  559. cookie: "graphics/emojis/cookie.png",
  560. chocolate_bar: "graphics/emojis/chocolate_bar.png",
  561. candy: "graphics/emojis/candy.png",
  562. lollipop: "graphics/emojis/lollipop.png",
  563. honey_pot: "graphics/emojis/honey_pot.png",
  564. apple: "graphics/emojis/apple.png",
  565. green_apple: "graphics/emojis/green_apple.png",
  566. tangerine: "graphics/emojis/tangerine.png",
  567. lemon: "graphics/emojis/lemon.png",
  568. cherries: "graphics/emojis/cherries.png",
  569. grapes: "graphics/emojis/grapes.png",
  570. watermelon: "graphics/emojis/watermelon.png",
  571. strawberry: "graphics/emojis/strawberry.png",
  572. peach: "graphics/emojis/peach.png",
  573. melon: "graphics/emojis/melon.png",
  574. banana: "graphics/emojis/banana.png",
  575. pear: "graphics/emojis/pear.png",
  576. pineapple: "graphics/emojis/pineapple.png",
  577. sweet_potato: "graphics/emojis/sweet_potato.png",
  578. eggplant: "graphics/emojis/eggplant.png",
  579. tomato: "graphics/emojis/tomato.png",
  580. corn: "graphics/emojis/corn.png",
  581. house: "graphics/emojis/house.png",
  582. house_with_garden: "graphics/emojis/house_with_garden.png",
  583. school: "graphics/emojis/school.png",
  584. office: "graphics/emojis/office.png",
  585. post_office: "graphics/emojis/post_office.png",
  586. hospital: "graphics/emojis/hospital.png",
  587. bank: "graphics/emojis/bank.png",
  588. convenience_store: "graphics/emojis/convenience_store.png",
  589. love_hotel: "graphics/emojis/love_hotel.png",
  590. hotel: "graphics/emojis/hotel.png",
  591. wedding: "graphics/emojis/wedding.png",
  592. church: "graphics/emojis/church.png",
  593. department_store: "graphics/emojis/department_store.png",
  594. european_post_office: "graphics/emojis/european_post_office.png",
  595. city_sunrise: "graphics/emojis/city_sunrise.png",
  596. city_sunset: "graphics/emojis/city_sunset.png",
  597. japanese_castle: "graphics/emojis/japanese_castle.png",
  598. european_castle: "graphics/emojis/european_castle.png",
  599. tent: "graphics/emojis/tent.png",
  600. factory: "graphics/emojis/factory.png",
  601. tokyo_tower: "graphics/emojis/tokyo_tower.png",
  602. japan: "graphics/emojis/japan.png",
  603. mount_fuji: "graphics/emojis/mount_fuji.png",
  604. sunrise_over_mountains: "graphics/emojis/sunrise_over_mountains.png",
  605. sunrise: "graphics/emojis/sunrise.png",
  606. stars: "graphics/emojis/stars.png",
  607. statue_of_liberty: "graphics/emojis/statue_of_liberty.png",
  608. bridge_at_night: "graphics/emojis/bridge_at_night.png",
  609. carousel_horse: "graphics/emojis/carousel_horse.png",
  610. rainbow: "graphics/emojis/rainbow.png",
  611. ferris_wheel: "graphics/emojis/ferris_wheel.png",
  612. fountain: "graphics/emojis/fountain.png",
  613. roller_coaster: "graphics/emojis/roller_coaster.png",
  614. ship: "graphics/emojis/ship.png",
  615. speedboat: "graphics/emojis/speedboat.png",
  616. boat: "graphics/emojis/boat.png",
  617. sailboat: "graphics/emojis/sailboat.png",
  618. rowboat: "graphics/emojis/rowboat.png",
  619. anchor: "graphics/emojis/anchor.png",
  620. rocket: "graphics/emojis/rocket.png",
  621. airplane: "graphics/emojis/airplane.png",
  622. helicopter: "graphics/emojis/helicopter.png",
  623. steam_locomotive: "graphics/emojis/steam_locomotive.png",
  624. tram: "graphics/emojis/tram.png",
  625. mountain_railway: "graphics/emojis/mountain_railway.png",
  626. bike: "graphics/emojis/bike.png",
  627. aerial_tramway: "graphics/emojis/aerial_tramway.png",
  628. suspension_railway: "graphics/emojis/suspension_railway.png",
  629. mountain_cableway: "graphics/emojis/mountain_cableway.png",
  630. tractor: "graphics/emojis/tractor.png",
  631. blue_car: "graphics/emojis/blue_car.png",
  632. oncoming_automobile: "graphics/emojis/oncoming_automobile.png",
  633. car: "graphics/emojis/car.png",
  634. red_car: "graphics/emojis/red_car.png",
  635. taxi: "graphics/emojis/taxi.png",
  636. oncoming_taxi: "graphics/emojis/oncoming_taxi.png",
  637. articulated_lorry: "graphics/emojis/articulated_lorry.png",
  638. bus: "graphics/emojis/bus.png",
  639. oncoming_bus: "graphics/emojis/oncoming_bus.png",
  640. rotating_light: "graphics/emojis/rotating_light.png",
  641. police_car: "graphics/emojis/police_car.png",
  642. oncoming_police_car: "graphics/emojis/oncoming_police_car.png",
  643. fire_engine: "graphics/emojis/fire_engine.png",
  644. ambulance: "graphics/emojis/ambulance.png",
  645. minibus: "graphics/emojis/minibus.png",
  646. truck: "graphics/emojis/truck.png",
  647. train: "graphics/emojis/train.png",
  648. station: "graphics/emojis/station.png",
  649. train2: "graphics/emojis/train2.png",
  650. bullettrain_front: "graphics/emojis/bullettrain_front.png",
  651. bullettrain_side: "graphics/emojis/bullettrain_side.png",
  652. light_rail: "graphics/emojis/light_rail.png",
  653. monorail: "graphics/emojis/monorail.png",
  654. railway_car: "graphics/emojis/railway_car.png",
  655. trolleybus: "graphics/emojis/trolleybus.png",
  656. ticket: "graphics/emojis/ticket.png",
  657. fuelpump: "graphics/emojis/fuelpump.png",
  658. vertical_traffic_light: "graphics/emojis/vertical_traffic_light.png",
  659. traffic_light: "graphics/emojis/traffic_light.png",
  660. warning: "graphics/emojis/warning.png",
  661. construction: "graphics/emojis/construction.png",
  662. beginner: "graphics/emojis/beginner.png",
  663. atm: "graphics/emojis/atm.png",
  664. slot_machine: "graphics/emojis/slot_machine.png",
  665. busstop: "graphics/emojis/busstop.png",
  666. barber: "graphics/emojis/barber.png",
  667. hotsprings: "graphics/emojis/hotsprings.png",
  668. checkered_flag: "graphics/emojis/checkered_flag.png",
  669. crossed_flags: "graphics/emojis/crossed_flags.png",
  670. izakaya_lantern: "graphics/emojis/izakaya_lantern.png",
  671. moyai: "graphics/emojis/moyai.png",
  672. circus_tent: "graphics/emojis/circus_tent.png",
  673. performing_arts: "graphics/emojis/performing_arts.png",
  674. round_pushpin: "graphics/emojis/round_pushpin.png",
  675. triangular_flag_on_post: "graphics/emojis/triangular_flag_on_post.png",
  676. jp: "graphics/emojis/jp.png",
  677. kr: "graphics/emojis/kr.png",
  678. cn: "graphics/emojis/cn.png",
  679. us: "graphics/emojis/us.png",
  680. fr: "graphics/emojis/fr.png",
  681. es: "graphics/emojis/es.png",
  682. it: "graphics/emojis/it.png",
  683. ru: "graphics/emojis/ru.png",
  684. gb: "graphics/emojis/gb.png",
  685. uk: "graphics/emojis/uk.png",
  686. de: "graphics/emojis/de.png",
  687. one: "graphics/emojis/one.png",
  688. two: "graphics/emojis/two.png",
  689. three: "graphics/emojis/three.png",
  690. four: "graphics/emojis/four.png",
  691. five: "graphics/emojis/five.png",
  692. six: "graphics/emojis/six.png",
  693. seven: "graphics/emojis/seven.png",
  694. eight: "graphics/emojis/eight.png",
  695. nine: "graphics/emojis/nine.png",
  696. keycap_ten: "graphics/emojis/keycap_ten.png",
  697. zero: "graphics/emojis/zero.png",
  698. hash: "graphics/emojis/hash.png",
  699. symbols: "graphics/emojis/symbols.png",
  700. arrow_backward: "graphics/emojis/arrow_backward.png",
  701. arrow_down: "graphics/emojis/arrow_down.png",
  702. arrow_forward: "graphics/emojis/arrow_forward.png",
  703. arrow_left: "graphics/emojis/arrow_left.png",
  704. capital_abcd: "graphics/emojis/capital_abcd.png",
  705. abcd: "graphics/emojis/abcd.png",
  706. abc: "graphics/emojis/abc.png",
  707. arrow_lower_left: "graphics/emojis/arrow_lower_left.png",
  708. arrow_lower_right: "graphics/emojis/arrow_lower_right.png",
  709. arrow_right: "graphics/emojis/arrow_right.png",
  710. arrow_up: "graphics/emojis/arrow_up.png",
  711. arrow_upper_left: "graphics/emojis/arrow_upper_left.png",
  712. arrow_upper_right: "graphics/emojis/arrow_upper_right.png",
  713. arrow_double_down: "graphics/emojis/arrow_double_down.png",
  714. arrow_double_up: "graphics/emojis/arrow_double_up.png",
  715. arrow_down_small: "graphics/emojis/arrow_down_small.png",
  716. arrow_heading_down: "graphics/emojis/arrow_heading_down.png",
  717. arrow_heading_up: "graphics/emojis/arrow_heading_up.png",
  718. leftwards_arrow_with_hook: "graphics/emojis/leftwards_arrow_with_hook.png",
  719. arrow_right_hook: "graphics/emojis/arrow_right_hook.png",
  720. left_right_arrow: "graphics/emojis/left_right_arrow.png",
  721. arrow_up_down: "graphics/emojis/arrow_up_down.png",
  722. arrow_up_small: "graphics/emojis/arrow_up_small.png",
  723. arrows_clockwise: "graphics/emojis/arrows_clockwise.png",
  724. arrows_counterclockwise: "graphics/emojis/arrows_counterclockwise.png",
  725. rewind: "graphics/emojis/rewind.png",
  726. fast_forward: "graphics/emojis/fast_forward.png",
  727. information_source: "graphics/emojis/information_source.png",
  728. ok: "graphics/emojis/ok.png",
  729. twisted_rightwards_arrows: "graphics/emojis/twisted_rightwards_arrows.png",
  730. repeat: "graphics/emojis/repeat.png",
  731. repeat_one: "graphics/emojis/repeat_one.png",
  732. new: "graphics/emojis/new.png",
  733. top: "graphics/emojis/top.png",
  734. up: "graphics/emojis/up.png",
  735. cool: "graphics/emojis/cool.png",
  736. free: "graphics/emojis/free.png",
  737. ng: "graphics/emojis/ng.png",
  738. cinema: "graphics/emojis/cinema.png",
  739. koko: "graphics/emojis/koko.png",
  740. signal_strength: "graphics/emojis/signal_strength.png",
  741. u5272: "graphics/emojis/u5272.png",
  742. u5408: "graphics/emojis/u5408.png",
  743. u55b6: "graphics/emojis/u55b6.png",
  744. u6307: "graphics/emojis/u6307.png",
  745. u6708: "graphics/emojis/u6708.png",
  746. u6709: "graphics/emojis/u6709.png",
  747. u6e80: "graphics/emojis/u6e80.png",
  748. u7121: "graphics/emojis/u7121.png",
  749. u7533: "graphics/emojis/u7533.png",
  750. u7a7a: "graphics/emojis/u7a7a.png",
  751. u7981: "graphics/emojis/u7981.png",
  752. sa: "graphics/emojis/sa.png",
  753. restroom: "graphics/emojis/restroom.png",
  754. mens: "graphics/emojis/mens.png",
  755. womens: "graphics/emojis/womens.png",
  756. baby_symbol: "graphics/emojis/baby_symbol.png",
  757. no_smoking: "graphics/emojis/no_smoking.png",
  758. parking: "graphics/emojis/parking.png",
  759. wheelchair: "graphics/emojis/wheelchair.png",
  760. metro: "graphics/emojis/metro.png",
  761. baggage_claim: "graphics/emojis/baggage_claim.png",
  762. accept: "graphics/emojis/accept.png",
  763. wc: "graphics/emojis/wc.png",
  764. potable_water: "graphics/emojis/potable_water.png",
  765. put_litter_in_its_place: "graphics/emojis/put_litter_in_its_place.png",
  766. secret: "graphics/emojis/secret.png",
  767. congratulations: "graphics/emojis/congratulations.png",
  768. m: "graphics/emojis/m.png",
  769. passport_control: "graphics/emojis/passport_control.png",
  770. left_luggage: "graphics/emojis/left_luggage.png",
  771. customs: "graphics/emojis/customs.png",
  772. ideograph_advantage: "graphics/emojis/ideograph_advantage.png",
  773. cl: "graphics/emojis/cl.png",
  774. sos: "graphics/emojis/sos.png",
  775. id: "graphics/emojis/id.png",
  776. no_entry_sign: "graphics/emojis/no_entry_sign.png",
  777. underage: "graphics/emojis/underage.png",
  778. no_mobile_phones: "graphics/emojis/no_mobile_phones.png",
  779. do_not_litter: "graphics/emojis/do_not_litter.png",
  780. "non-potable_water": "graphics/emojis/non-potable_water.png",
  781. no_bicycles: "graphics/emojis/no_bicycles.png",
  782. no_pedestrians: "graphics/emojis/no_pedestrians.png",
  783. children_crossing: "graphics/emojis/children_crossing.png",
  784. no_entry: "graphics/emojis/no_entry.png",
  785. eight_spoked_asterisk: "graphics/emojis/eight_spoked_asterisk.png",
  786. sparkle: "graphics/emojis/sparkle.png",
  787. eight_pointed_black_star: "graphics/emojis/eight_pointed_black_star.png",
  788. heart_decoration: "graphics/emojis/heart_decoration.png",
  789. vs: "graphics/emojis/vs.png",
  790. vibration_mode: "graphics/emojis/vibration_mode.png",
  791. mobile_phone_off: "graphics/emojis/mobile_phone_off.png",
  792. chart: "graphics/emojis/chart.png",
  793. currency_exchange: "graphics/emojis/currency_exchange.png",
  794. aries: "graphics/emojis/aries.png",
  795. taurus: "graphics/emojis/taurus.png",
  796. gemini: "graphics/emojis/gemini.png",
  797. cancer: "graphics/emojis/cancer.png",
  798. leo: "graphics/emojis/leo.png",
  799. virgo: "graphics/emojis/virgo.png",
  800. libra: "graphics/emojis/libra.png",
  801. scorpius: "graphics/emojis/scorpius.png",
  802. sagittarius: "graphics/emojis/sagittarius.png",
  803. capricorn: "graphics/emojis/capricorn.png",
  804. aquarius: "graphics/emojis/aquarius.png",
  805. pisces: "graphics/emojis/pisces.png",
  806. ophiuchus: "graphics/emojis/ophiuchus.png",
  807. six_pointed_star: "graphics/emojis/six_pointed_star.png",
  808. negative_squared_cross_mark: "graphics/emojis/negative_squared_cross_mark.png",
  809. a: "graphics/emojis/a.png",
  810. b: "graphics/emojis/b.png",
  811. ab: "graphics/emojis/ab.png",
  812. o2: "graphics/emojis/o2.png",
  813. diamond_shape_with_a_dot_inside: "graphics/emojis/diamond_shape_with_a_dot_inside.png",
  814. recycle: "graphics/emojis/recycle.png",
  815. end: "graphics/emojis/end.png",
  816. back: "graphics/emojis/back.png",
  817. on: "graphics/emojis/on.png",
  818. soon: "graphics/emojis/soon.png",
  819. clock1: "graphics/emojis/clock1.png",
  820. clock130: "graphics/emojis/clock130.png",
  821. clock10: "graphics/emojis/clock10.png",
  822. clock1030: "graphics/emojis/clock1030.png",
  823. clock11: "graphics/emojis/clock11.png",
  824. clock1130: "graphics/emojis/clock1130.png",
  825. clock12: "graphics/emojis/clock12.png",
  826. clock1230: "graphics/emojis/clock1230.png",
  827. clock2: "graphics/emojis/clock2.png",
  828. clock230: "graphics/emojis/clock230.png",
  829. clock3: "graphics/emojis/clock3.png",
  830. clock330: "graphics/emojis/clock330.png",
  831. clock4: "graphics/emojis/clock4.png",
  832. clock430: "graphics/emojis/clock430.png",
  833. clock5: "graphics/emojis/clock5.png",
  834. clock530: "graphics/emojis/clock530.png",
  835. clock6: "graphics/emojis/clock6.png",
  836. clock630: "graphics/emojis/clock630.png",
  837. clock7: "graphics/emojis/clock7.png",
  838. clock730: "graphics/emojis/clock730.png",
  839. clock8: "graphics/emojis/clock8.png",
  840. clock830: "graphics/emojis/clock830.png",
  841. clock9: "graphics/emojis/clock9.png",
  842. clock930: "graphics/emojis/clock930.png",
  843. heavy_dollar_sign: "graphics/emojis/heavy_dollar_sign.png",
  844. copyright: "graphics/emojis/copyright.png",
  845. registered: "graphics/emojis/registered.png",
  846. tm: "graphics/emojis/tm.png",
  847. x: "graphics/emojis/x.png",
  848. heavy_exclamation_mark: "graphics/emojis/heavy_exclamation_mark.png",
  849. bangbang: "graphics/emojis/bangbang.png",
  850. interrobang: "graphics/emojis/interrobang.png",
  851. o: "graphics/emojis/o.png",
  852. heavy_multiplication_x: "graphics/emojis/heavy_multiplication_x.png",
  853. heavy_plus_sign: "graphics/emojis/heavy_plus_sign.png",
  854. heavy_minus_sign: "graphics/emojis/heavy_minus_sign.png",
  855. heavy_division_sign: "graphics/emojis/heavy_division_sign.png",
  856. white_flower: "graphics/emojis/white_flower.png",
  857. heavy_check_mark: "graphics/emojis/heavy_check_mark.png",
  858. ballot_box_with_check: "graphics/emojis/ballot_box_with_check.png",
  859. radio_button: "graphics/emojis/radio_button.png",
  860. link: "graphics/emojis/link.png",
  861. curly_loop: "graphics/emojis/curly_loop.png",
  862. wavy_dash: "graphics/emojis/wavy_dash.png",
  863. part_alternation_mark: "graphics/emojis/part_alternation_mark.png",
  864. trident: "graphics/emojis/trident.png",
  865. black_small_square: "graphics/emojis/black_small_square.png",
  866. white_small_square: "graphics/emojis/white_small_square.png",
  867. black_medium_small_square: "graphics/emojis/black_medium_small_square.png",
  868. white_medium_small_square: "graphics/emojis/white_medium_small_square.png",
  869. black_medium_square: "graphics/emojis/black_medium_square.png",
  870. white_medium_square: "graphics/emojis/white_medium_square.png",
  871. black_large_square: "graphics/emojis/black_square.png",
  872. white_large_square: "graphics/emojis/white_large_square.png",
  873. white_check_mark: "graphics/emojis/white_check_mark.png",
  874. black_square_button: "graphics/emojis/black_square_button.png",
  875. white_square_button: "graphics/emojis/white_square_button.png",
  876. black_circle: "graphics/emojis/black_circle.png",
  877. white_circle: "graphics/emojis/white_circle.png",
  878. red_circle: "graphics/emojis/red_circle.png",
  879. large_blue_circle: "graphics/emojis/large_blue_circle.png",
  880. large_blue_diamond: "graphics/emojis/large_blue_diamond.png",
  881. large_orange_diamond: "graphics/emojis/large_orange_diamond.png",
  882. small_blue_diamond: "graphics/emojis/small_blue_diamond.png",
  883. small_orange_diamond: "graphics/emojis/small_orange_diamond.png",
  884. small_red_triangle: "graphics/emojis/small_red_triangle.png",
  885. small_red_triangle_down: "graphics/emojis/small_red_triangle_down.png",
  886. shipit: "graphics/emojis/shipit.png",
  887. };
  888. const wwwConstStrFirst = `<img src="https://www.webfx.com/tools/emoji-cheat-sheet/`;
  889. const wwwConstStrLast = `" width="25"></img>`;
  890. function smilify(message) {
  891. for (key in smileObj) {
  892. // key += ""; // если раскомментировать, то можно ниже обращаться через точку
  893. while (message !== message.replace(`:${key}:`, wwwConstStrFirst + smileObj[key] + wwwConstStrLast)) {
  894. message = message.replace(`:${key}:`, wwwConstStrFirst + smileObj[key] + wwwConstStrLast);
  895. }
  896. }
  897. return message;
  898. }
  899. // let nick = "testnick";
  900. while (!(nick = prompt("Введите свой ник:"))) {}
  901. nickId.value = nick;
  902. socket.emit("msg", {
  903. nick: nickId.value,
  904. message: "---Я тут новенький!!!---",
  905. });
  906. nickId.setAttribute("readonly", "readonly");
  907. // отправка сообщения в чат при нажатии Enter в поле ввода сообщения
  908. // при нажатии стрелки вверх - повтор последнего собщения
  909. msgId.addEventListener("keydown", function (e) {
  910. // console.log(e.keyCode);
  911. if (e.keyCode === 13) {
  912. sendId.onclick();
  913. }
  914. if (e.keyCode === 38) {
  915. msgId.value = lastMsg;
  916. }
  917. });
  918. function reciveMsg(msg) {
  919. console.log(msg);
  920. let p = document.createElement("div");
  921. if (msg.nick === "--Администрация--") {
  922. p.append(msg.nick + ": " + msg.message);
  923. chatWindow.append(p);
  924. users.length = 0;
  925. socket.emit("msg", {
  926. nick: nickId.value,
  927. message: "$$_iAm_$$",
  928. });
  929. } else if (msg.message !== "$$_iAm_$$") {
  930. msg.message = smilify(msg.message);
  931. let msgNick = document.createElement("span");
  932. msgNick.setAttribute("class", "nikInChat");
  933. if (~msg.message.indexOf(`to_` + nick + ":")) {
  934. // если пришло личное сообщение
  935. p.setAttribute("style", `color: green`);
  936. }
  937. msgNick.insertAdjacentHTML("beforeend", "<b>" + msg.nick + ":</b> ");
  938. // кликабельный ник
  939. msgNick.onclick = function () {
  940. msgId.value = `to_` + msg.nick + `: ` + msgId.value;
  941. };
  942. p.append(msgNick);
  943. p.insertAdjacentHTML("beforeend", msg.message);
  944. chatWindow.append(p);
  945. }
  946. chatWindow.scrollTop = chatWindow.scrollHeight; // прокрутка скрола чата
  947. if (!~users.indexOf(msg.nick) && msg.nick !== "--Администрация--") {
  948. users.push(msg.nick);
  949. users.sort((a, b) => (a < b && -1) || 1);
  950. whoIsHere.innerHTML = "Кто у нас тут в чате:";
  951. for (let i of users) {
  952. let p = document.createElement("div");
  953. p.setAttribute("class", "nikInChat");
  954. p.onclick = function () {
  955. msgId.value = `to_` + i + `: ` + msgId.value; // еще замыкание !!!
  956. };
  957. p.insertAdjacentHTML("beforeend", "<b>" + i + "</b>");
  958. whoIsHere.append(p);
  959. }
  960. }
  961. }
  962. socket.on("msg", (msg) => reciveMsg(msg));
  963. var lastMsg;
  964. sendId.onclick = () => {
  965. socket.emit("msg", {
  966. nick: nickId.value,
  967. message: smilify(msgId.value),
  968. });
  969. lastMsg = msgId.value;
  970. msgId.value = "";
  971. };
  972. // debugger;
  973. // построение поля смайликов
  974. for (let [key, value] of Object.entries(smileObj)) {
  975. let smile = document.createElement("span");
  976. smile.setAttribute("class", "smile");
  977. smile.insertAdjacentHTML("beforeend", wwwConstStrFirst + value + wwwConstStrLast);
  978. smile.onclick = function () {
  979. msgId.value += ` :${key}: `; // походу это замыкание
  980. };
  981. smileArea.append(smile);
  982. }