This commit is contained in:
Valeria Fadeeva 2023-12-15 21:59:29 +05:00
parent 6d83575668
commit 02cd64918f
1 changed files with 3 additions and 7 deletions

View File

@ -49,9 +49,9 @@ document.addEventListener("DOMContentLoaded", ready);
// Загрузка HTML из файла при загрузке URL
async function bodyFetch(url) {
if (!url) {
var tplUrl = 'news.tpl.html';
async function bodyFetch(url = "") {
if(!url || url == "") {
var tplUrl = "news.tpl.html";
} else {
var tplUrl = url + ".tpl.html";
}
@ -94,10 +94,6 @@ switch (query) {
bodyFetch(query);
break;
case "/mastodon":
bodyFetch(query);
break;
default:
bodyFetch();
}