This commit is contained in:
Valeria Fadeeva 2023-12-10 01:39:44 +05:00
parent a7cb70c211
commit db194df179
1 changed files with 2 additions and 4 deletions

View File

@ -43,10 +43,8 @@ function ready() {
document.addEventListener("DOMContentLoaded", ready);
const log = document.getElementById('log');
log.innerHTML = "<hr><br>";
async function fetchData() {
let log = document.getElementById('log');
var serverAddress = "techhub.social";
@ -78,7 +76,7 @@ async function bodyFetch(url) {
let response = await fetch(tplUrl);
let body = document.getElementById('body');
if(tplUrl == 'news.tpl.html') {let res = await fetchData();}
if (tplUrl == 'news.tpl.html') {let res = await fetchData();}
if (response.ok) { // если HTTP-статус в диапазоне 200-299
// получаем тело ответа (см. про этот метод ниже)