File tree Expand file tree Collapse file tree
Projects/Motivation Mantra Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Code for loading a new quote everytime the button is clicked
2- function loadQuote ( )
3- {
2+ function loadQuote ( ) {
43 document . getElementById ( "copy" ) . innerText = "Copy" ;
54 document . getElementById ( "next" ) . innerText = " loading..." ;
65 var para = document . getElementById ( "quoteLine" ) ;
@@ -14,17 +13,17 @@ function loadQuote()
1413 } ) ;
1514}
1615
16+
1717// Code to copy the quote
18- function copyQuote ( )
19- {
18+ function copyQuote ( ) {
2019 copyText = document . getElementById ( "quoteLine" ) . innerText + " " + document . getElementById ( "author" ) . innerText ;
2120 navigator . clipboard . writeText ( copyText ) ;
2221 document . getElementById ( "copy" ) . innerText = "Copied" ;
2322}
2423
24+
2525// Code to enable speech feature
26- function listen ( )
27- {
26+ function listen ( ) {
2827 let utterance = new SpeechSynthesisUtterance ( document . getElementById ( "quoteLine" ) . innerText ) ;
2928 speechSynthesis . speak ( utterance ) ;
3029}
You can’t perform that action at this time.
0 commit comments