File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 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.
8181newQuoteButton . addEventListener ( "click" , function ( ) {
8282 displayNewQuote ( ) ;
Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff line change 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 */
You can’t perform that action at this time.
0 commit comments