This PR fixes the issue with the Moji decoding functionality on the website. The "Decode" button was not returning the codes for emojis and the URL was not updating with the characters in the text field when the button was pressed.
Summary of Changes
Modified the event listener for the "Decode" button in public_html/index.html to correctly extract the emoji input, send a POST request to the "/decode" endpoint, and update the "result" div and the URL with the response.
Modified the "/decode" endpoint in moji.js to correctly extract the emoji from the request body, look up the emoji name using the EmojiDictionary module, generate the Unicode code point for the emoji using the emoji-unicode module, and send a response with the emoji name and code point.
These changes ensure that the Moji decoding functionality works as expected, providing the correct codes for emojis and updating the URL with the characters in the text field.
Fixes #14.
🎉 Latest improvements to Sweep:
Sweep can now passively improve your repository! Check out Rules to learn more.
💡 To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
PR Feedback (click)
Description
This PR fixes the issue with the Moji decoding functionality on the website. The "Decode" button was not returning the codes for emojis and the URL was not updating with the characters in the text field when the button was pressed.
Summary of Changes
public_html/index.html
to correctly extract the emoji input, send a POST request to the "/decode" endpoint, and update the "result" div and the URL with the response.moji.js
to correctly extract the emoji from the request body, look up the emoji name using the EmojiDictionary module, generate the Unicode code point for the emoji using the emoji-unicode module, and send a response with the emoji name and code point.These changes ensure that the Moji decoding functionality works as expected, providing the correct codes for emojis and updating the URL with the characters in the text field.
Fixes #14.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: