Skip to content

Commit

Permalink
Fix spinner in error senario
Browse files Browse the repository at this point in the history
  • Loading branch information
anasserhussien committed Apr 28, 2024
1 parent 9a743af commit f0aa78c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,16 @@

function sendArticle() {
const articleURL = document.getElementById('article-text').value;
document.getElementById('loading').style.display = 'block';
const intervalID = updateMessage();



if (!isValidWikipediaUrl(articleURL)){
document.getElementById('error-message').innerText = 'Please enter a valid Wikipedia URL.';
return;
}
else{
document.getElementById('loading').style.display = 'block';
const intervalID = updateMessage();
document.getElementById('error-message').innerText = ""
}
fetch('/send', {
Expand Down

0 comments on commit f0aa78c

Please sign in to comment.