Skip to content

Commit 89c0209

Browse files
committed
fix: align with requirements
Updates include: - Changing 'New Quote' button text to 'New quote' to match test expectations - Setting autoplay interval to 60 seconds (60000ms) as per requirements - Correcting 'italicized' to 'italicised' in CSS comments - Ensuring British English spelling in comments
1 parent 00423a7 commit 89c0209

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sprint-3/quote-generator/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* globals quotes, pickFromArray */
22

33
// Use a constant for the auto-play time to make it easy to change later.
4-
const AUTO_PLAY_INTERVAL_MS = 5000;
4+
const AUTO_PLAY_INTERVAL_MS = 60000;
55

66
// Defines variables to track the state of the app.
77
// Uses 'let' because the timer ID will change when we start/stop auto-play.
@@ -40,7 +40,7 @@ function startAutoPlay() {
4040
// Shows the "auto-play: ON" status text to inform the user it is active.
4141
autoPlayStatus.classList.add("active");
4242

43-
// Sets a repeating timer that calls 'displayNewQuote' every 5000 milliseconds (5 seconds).
43+
// Sets a repeating timer that calls 'displayNewQuote' every 60000 milliseconds (60 seconds).
4444
autoPlayIntervalId = setInterval(function () {
4545
displayNewQuote();
4646
}, AUTO_PLAY_INTERVAL_MS);
@@ -76,7 +76,7 @@ function handleAutoPlayToggle(event) {
7676
}
7777
}
7878

79-
// Adds an event listener to the "New Quote" button.
79+
// Adds an event listener to the "New quote" button.
8080
// When clicked, it shows a new quote and resets the auto-play timer if it's running.
8181
newQuoteButton.addEventListener("click", function () {
8282
displayNewQuote();

Sprint-3/quote-generator/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Quote generator app</h1>
2323
<p id="author"></p>
2424

2525
<div class="controls">
26-
<button type="button" id="new-quote">New Quote</button>
26+
<button type="button" id="new-quote">New quote</button>
2727

2828
<div class="auto-play-container">
2929
<span class="switch-label">Auto-play</span>

Sprint-3/quote-generator/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ h1 {
6666
color: var(--text-color);
6767
margin-bottom: 2.5rem;
6868
text-align: right;
69-
font-style: italic; /* Authors are often italicized in this style */
69+
font-style: italic; /* Authors are often italicised in this style */
7070
}
7171

7272
/* Add dash before author if not present in JS, but here we style assuming content */

0 commit comments

Comments
 (0)