Compare commits

...

3 Commits

3 changed files with 3 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
node_modules node_modules
config.js config.js
yandex_* yandex_*
zen_*
radio_filelist.html radio_filelist.html

View File

@ -1,5 +1,3 @@
const categories = ["update", "diary"];
const buttons = document.getElementsByTagName("button"); const buttons = document.getElementsByTagName("button");
const articles = document.getElementsByTagName("article"); const articles = document.getElementsByTagName("article");
@ -8,9 +6,8 @@ document.getElementById("filter").classList.remove("hidden");
for (let i = 0; i < buttons.length; ++i) for (let i = 0; i < buttons.length; ++i)
if (buttons[i].name !== "") if (buttons[i].name !== "")
buttons[i].addEventListener("click", e => { buttons[i].addEventListener("click", e => {
const category = e.target.name;
for (let j = 0; j < articles.length; ++j) for (let j = 0; j < articles.length; ++j)
if (articles[j].id.startsWith(category) || category === "all") if (articles[j].id.startsWith(e.target.name) || e.target.name === "all")
articles[j].classList.remove("hidden"); articles[j].classList.remove("hidden");
else else
articles[j].classList.add("hidden"); }); articles[j].classList.add("hidden"); });

View File

@ -1,7 +1,7 @@
{ {
"name": "arav-dwelling", "name": "arav-dwelling",
"description": "Arav's dwelling", "description": "Arav's dwelling",
"version": "22.35.0", "version": "22.37.0",
"author": "Alexander \"Arav\" Andreev <me@arav.top> (https://arav.top)", "author": "Alexander \"Arav\" Andreev <me@arav.top> (https://arav.top)",
"license": "GPLv3", "license": "GPLv3",
"homepage": "https://git.arav.top/Arav/Dwelling", "homepage": "https://git.arav.top/Arav/Dwelling",