doyouwannagooutwithme icon indicating copy to clipboard operation
doyouwannagooutwithme copied to clipboard

Add Dynamic name customization

Open moshejs opened this issue 1 year ago • 1 comments

This pull request introduces a client-side JavaScript enhancement that dynamically personalizes the webpage based on a user's name passed through the URL query parameters. The feature capitalizes the first letter of the name and inserts it into the specified location within the HTML content, providing a more personalized and engaging user experience.

Key Changes:

  1. Dynamic Name Retrieval: The script extracts the 'name' query parameter from the current page's URL.
  2. Capitalization Functionality: It capitalizes the first letter of the retrieved name to ensure proper formatting.
  3. Dynamic Content Insertion: The personalized name is then inserted into the HTML content at the designated placeholder.

Enhancements:

  • Personalized User Experience: Users visiting the page with a URL like http://yourdomain.com?name=john will see a customized greeting, e.g., "Do you wanna go out with me, John?"
  • Improved Engagement: Personalization can significantly enhance user engagement and the overall user experience.

Usage Notes:

  • Ensure the namePlaceholder ID is present in the HTML where the personalized name should appear.
  • Consider adding sanitation to the name input to enhance security and prevent potential script injection.

This update aims to make the webpage feel more engaging and tailored to individual users by dynamically inserting their names into the text.

moshejs avatar Dec 25 '23 21:12 moshejs

its not working for me

Jsotomolinez avatar Jan 02 '24 17:01 Jsotomolinez