dev-AshishRanjan / Hacktoberfest-Frontend

Make your Pull Request for Hacktoberfest 2024 in the Web domain specially Frontend. And give this repo a ⭐
https://frontend-database.netlify.app
MIT License
18 stars 41 forks source link

make a stop watch #43

Closed MuhammadSarimWaseem closed 1 year ago

MuhammadSarimWaseem commented 1 year ago

Describe your change:

Checklist:

ATTACH SCREEN-SHOTS

Before After
< Before Image > < After Image >
netlify[bot] commented 1 year ago

Deploy Preview for frontend-database ready!

Name Link
Latest commit 0697d795c877873a01e949b3f3312b84a39521f2
Latest deploy log https://app.netlify.com/sites/frontend-database/deploys/6523e268293cfc0008c63e0e
Deploy Preview https://deploy-preview-43--frontend-database.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

pr-explainer-bot[bot] commented 1 year ago

Pull Request Report

Hey there! I'm here to provide you with a report on the changes made in the pull request. Let's dive in!

Changes

  1. Added app.js file with the following changes:

    • Added variables milli, sec, mint, and interval.
    • Added function millisecond() to increment milli and update the value in the HTML.
    • Added function start() to start the stopwatch by calling millisecond() every 10 milliseconds.
    • Added function stop() to stop the stopwatch by clearing the interval.
    • Added function reset() to reset the stopwatch by setting all variables to 0 and updating the value in the HTML.
    • Added function second() to increment sec and update the value in the HTML when milli reaches 100.
    • Added function minute() to increment mint and update the value in the HTML when sec reaches 60.
    • Added function disable_start() to disable the start button and enable the stop and reset buttons.
    • Added function disable_stop() to disable the stop button and enable the start and reset buttons.
  2. Added index.html file with the following changes:

    • Added HTML structure for the stop watch.
    • Added input fields for minutes, seconds, and milliseconds.
    • Added buttons for start, stop, and reset, with corresponding onclick events.
  3. Added style.css file with the following changes:

    • Added CSS styles for the stop watch layout and design.
    • Added media queries for responsive design.

Suggestions

Bugs

Improvements

// In app.js
document.getElementById("disabled1").addEventListener("click", start);

function start() {
  disable_start();
  interval = setInterval(millisecond, 10);
}

Rating

I would rate the code a 7 out of 10 based on the following criteria:

That's it for the pull request report! Let me know if you need any further assistance. Keep up the good work! 👍

dev-AshishRanjan commented 1 year ago

@MuhammadSarimWaseem ,

Please add the project details in contribution/ProjectList.json