This PR adds a new feature to the Moji The Decoder application that allows the URL to reflect the emoji being shown on the site. This enables users to link to the site with a specific emoji displayed.
Summary of Changes
Modified moji.js to import the url module and add a new route handler for GET requests to "/:emoji". This route extracts the "emoji" parameter from the request URL, decodes it using the emoji-dictionary and emoji-unicode modules, and sends the decoded emoji as the response.
Modified moji.js to update the existing route handlers to redirect to the new "/:emoji" route with the appropriate emoji parameter in the URL, instead of sending the decoded emoji as the response directly.
Modified public_html/index.html to add a new script that updates the page URL with the selected emoji parameter when an emoji is selected.
Modified the existing JavaScript code in public_html/index.html that handles emoji selection to call the new function with the selected emoji.
No changes were made to the Docker configuration in docker-compose.yml.
No changes were made to the dependencies or scripts in package.json.
Fixes #11.
🎉 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: 👎
Description
This PR adds a new feature to the Moji The Decoder application that allows the URL to reflect the emoji being shown on the site. This enables users to link to the site with a specific emoji displayed.
Summary of Changes
moji.js
to import theurl
module and add a new route handler for GET requests to "/:emoji". This route extracts the "emoji" parameter from the request URL, decodes it using theemoji-dictionary
andemoji-unicode
modules, and sends the decoded emoji as the response.moji.js
to update the existing route handlers to redirect to the new "/:emoji" route with the appropriate emoji parameter in the URL, instead of sending the decoded emoji as the response directly.public_html/index.html
to add a new script that updates the page URL with the selected emoji parameter when an emoji is selected.public_html/index.html
that handles emoji selection to call the new function with the selected emoji.docker-compose.yml
.package.json
.Fixes #11.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: