Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add counter for each link usage #2

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Add counter for each link usage #2

merged 1 commit into from
Jul 10, 2024

Conversation

Iltwats
Copy link
Owner

@Iltwats Iltwats commented Jul 10, 2024

Related to #1

Add a counter for each link that stores the total count of times it has been used.

  • index.html

    • Add a new div element with id counter inside the responseField div.
  • public/helperFunctions.js

    • Add a new function updateCounter that increments the counter for each link usage.
    • Call updateCounter inside renderResponse and renderRawResponse functions.
  • public/main.js

    • Add a new variable counter to store the count of link usage.
    • Initialize counter to 0.
    • Increment counter inside shortenUrl function.
    • Display the counter value inside the responseField div.

For more details, open the Copilot Workspace session.

@Iltwats Iltwats merged commit 1fe15ba into master Jul 10, 2024
@Iltwats Iltwats self-assigned this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant