From 4e7e710bf5ccf8672e7809d2be04bd96e1a4ae61 Mon Sep 17 00:00:00 2001 From: Degradin Date: Mon, 20 Jan 2025 23:50:12 +0300 Subject: [PATCH] Update index.html --- public/index.html | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/public/index.html b/public/index.html index 1c74d34..807a54d 100644 --- a/public/index.html +++ b/public/index.html @@ -235,19 +235,15 @@ } } - // Подписываемся на обновления данных - tg.subscribeToData((data) => { - console.log("Обновление данных:", data); - }); - // При получении сообщения от бота обновляем страницу - tg.subscribeToMessages((messages) => { - console.log("Получено сообщение:", messages); - location.reload(); - }); - // Обновляем сайт каждые 5 секунд для получения актуальных данных - setInterval(() => { + // Добавляем внизу кнопку для обновления данных + const container = document.querySelector(".container"); + const updateButton = document.createElement("button"); + updateButton.textContent = "🔄 Обновить данные" + updateButton.classList.add("button"); + updateButton.addEventListener("click", () => { window.location.reload(); - }, 5000); + }); + container.appendChild(updateButton); \ No newline at end of file