diff --git a/src/html/about.html b/src/html/about.html index 6831f64..bfd73c7 100644 --- a/src/html/about.html +++ b/src/html/about.html @@ -64,10 +64,11 @@

Explore More of My Projects:

Visit EventHorizon
-

Take a look at my other projects on GitHub. A showcase of my coding journey!

+

Take a look at my other projects on GitHub - a showcase of my coding journey!

Visit My GitHub!
+

Our Commitment:

The WeatherMate App is a labor of love, crafted with the intent to bring you the most up-to-date weather information in the most convenient way possible. Developed by Son Nguyen Hoang in 2023, our app is constantly evolving with new features to enhance your weather experience.

Thank you for choosing The WeatherMate App. We are committed to providing you with a reliable and enjoyable weather service.

← Back to Home diff --git a/src/js/chatbot.js b/src/js/chatbot.js index 7d678ff..fc6dabf 100644 --- a/src/js/chatbot.js +++ b/src/js/chatbot.js @@ -36,6 +36,7 @@ async function getBotResponse(message) { try { showLoadingMessage(); + scrollToBottom(); const genAI = new GoogleGenerativeAI(getAIResponse()); const model = genAI.getGenerativeModel({ @@ -139,6 +140,7 @@ chatInput.addEventListener("keydown", (e) => { e.target.value = ''; } + scrollToBottom(); }); const toggleButton = document.createElement("button"); diff --git a/src/js/script.js b/src/js/script.js index 7b296ef..8a8c4b0 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -78,7 +78,7 @@ async function getWeatherByLocation(city) { lastCity = city; document.getElementById("forecast-display").classList.remove('hide'); - document.getElementById( "forecast-display" ).classList.add( 'show' ); + document.getElementById( "forecast-display").classList.add('show'); document.getElementById("forecast-btn").textContent = `View Forecast For ${city}`; document.getElementById("aqi-btn").textContent = `View Air Quality Index For ${city}`; @@ -427,11 +427,8 @@ function toggleTemperatureUnit() { function updateTemperatures() { if (lastCity) { getWeatherByLocation(lastCity); - const forecastBtn = document.getElementById("forecast-btn"); - if (forecastBtn.textContent.includes("Close Forecast")) { - const lat = forecastBtn.getAttribute("data-lat"); - const lon = forecastBtn.getAttribute("data-lon"); - getForecastByLocation(lat, lon); + if (popupStatus.forecast === true) { + toggleForecast(); } } }