From 11ed5666891bb824abaa050a5df518db31bb81bf Mon Sep 17 00:00:00 2001 From: mallusrgreatv2 Date: Tue, 5 Mar 2024 14:47:00 +0530 Subject: [PATCH] feat(AniWatch): add HiAnime rebrand (#8154) * feat: add HiAnime rebrand * chore(AniWatch): bump version --- websites/A/AniWatch/metadata.json | 5 +++-- websites/A/AniWatch/presence.ts | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/websites/A/AniWatch/metadata.json b/websites/A/AniWatch/metadata.json index ad44e3b36fdc..065b39f2184e 100644 --- a/websites/A/AniWatch/metadata.json +++ b/websites/A/AniWatch/metadata.json @@ -10,9 +10,10 @@ }, "url": [ "aniwatch.to", - "aniwatchtv.to" + "aniwatchtv.to", + "hianime.to" ], - "version": "1.0.5", + "version": "1.0.6", "logo": "https://cdn.rcd.gg/PreMiD/websites/A/AniWatch/assets/logo.png", "thumbnail": "https://cdn.rcd.gg/PreMiD/websites/A/AniWatch/assets/thumbnail.png", "color": "#ffdd95", diff --git a/websites/A/AniWatch/presence.ts b/websites/A/AniWatch/presence.ts index 1973783b06c5..f128b06d2d23 100644 --- a/websites/A/AniWatch/presence.ts +++ b/websites/A/AniWatch/presence.ts @@ -11,6 +11,7 @@ let data: { const enum Assets { AniWatchLogo = "https://cdn.rcd.gg/PreMiD/websites/A/AniWatch/assets/0.png", + HiAnimeLogo = "https://i.imgur.com/a9gT2wg.png", Settings = "https://cdn.rcd.gg/PreMiD/websites/A/AniWatch/assets/1.png", Notifications = "https://cdn.rcd.gg/PreMiD/websites/A/AniWatch/assets/2.png", } @@ -27,15 +28,16 @@ presence.on( ); presence.on("UpdateData", async () => { - const presenceData: PresenceData = { - largeImageKey: Assets.AniWatchLogo, + const isHiAnime = document.location.hostname === "hianime.to", + presenceData: PresenceData = { + largeImageKey: isHiAnime ? Assets.HiAnimeLogo : Assets.AniWatchLogo, startTimestamp: browsingTimestamp, }, { pathname, href } = document.location, buttons = await presence.getSetting("buttons"); if (pathname === "/" || pathname === "/home") - presenceData.details = "Exploring AniWatch.to"; + presenceData.details = `Exploring ${isHiAnime ? "HiAnime" : "AniWatch"}.to`; else if ( /\/(most-favorite|most-popular|movie|recently-added|recently-updated|tv|top-airing|top-upcoming|ona|ova|special|(genre\/.*))/.test( pathname