From 442849fe24f47b9b35ab2704b5da24d5c799bcd1 Mon Sep 17 00:00:00 2001 From: Artem Shevchenko <81616507+Dyrdoom@users.noreply.github.com> Date: Sun, 2 Feb 2025 22:18:18 +0200 Subject: [PATCH] Added anime section Signed-off-by: Artem Shevchenko <81616507+Dyrdoom@users.noreply.github.com> --- websites/H/HDrezka/presence.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/websites/H/HDrezka/presence.ts b/websites/H/HDrezka/presence.ts index def468925d50..c0c3b83b3c56 100644 --- a/websites/H/HDrezka/presence.ts +++ b/websites/H/HDrezka/presence.ts @@ -19,6 +19,8 @@ presence.on("UpdateData", async () => { ? "сериал" : contentType === "cartoons" ? "мультфильм" + : contentType === "animation" + ? "аниме" : "чего-то"; if (document.location.pathname === "/") @@ -28,9 +30,12 @@ presence.on("UpdateData", async () => { document.location.pathname === "/films" || document.location.pathname === "/series" || document.location.pathname === "/cartoons" || - document.location.pathname.match(/\/(films|series|cartoons)\//) + document.location.pathname === "/animation" || + document.location.pathname.match(/\/(films|series|cartoons|animation)\//) ) { - if (document.location.pathname.match(/\/(films|series|cartoons)\/.+/)) { + if ( + document.location.pathname.match(/\/(films|series|cartoons|animation)\/.+/) + ) { presenceData.details = `Смотрит ${currentType}`; presenceData.state = `${ document.querySelector(".b-post__title h1").textContent