Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@types/node": "^24.9.2",
"@vitest/coverage-v8": "^4.0.6",
"@vitest/ui": "^4.0.6",
"baseline-browser-mapping": "^2.9.14",
"eslint": "^9.38.0",
"eslint-plugin-format": "^1.0.2",
"eslint-plugin-json-schema-validator": "^5.4.1",
Expand Down
13 changes: 13 additions & 0 deletions websites/Y/YummyAnime/iframe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const iframe = new iFrame();

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

iframe.on("UpdateData", async () => {

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
const video = document.querySelector("video");

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

if (video && !Number.isNaN(video.duration)) {
iframe.send({
duration: video.duration,
currentTime: video.currentTime,
paused: video.paused,
});

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}
});

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
22 changes: 22 additions & 0 deletions websites/Y/YummyAnime/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://schemas.premid.app/metadata/1.16",
"apiVersion": 2,
"author": {
"id": "1045800378228281345",
"name": "harryys"
},
"service": "YummyAnime",
"description": {
"en": "Displays anime you are watching on YummyAnime."
},
"url": "yummyani.me",
"regExp": "^https?://(www\\.)?(site\\.)?(en\\.)?yummyani\\.me/.*",
"version": "1.0.0",
"logo": "https://i.imgur.com/6XnAGga.jpeg",
"thumbnail": "https://i.imgur.com/6XnAGga.jpeg",
"color": "#FF5722",
"category": "anime",
"tags": ["anime", "video"],
"iframe": true,
"iFrameRegExp": "kodik"
}
125 changes: 125 additions & 0 deletions websites/Y/YummyAnime/presence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
const presence = new Presence({
clientId: "1045800378228281345",

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
});

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

let videoData = {
duration: 0,
currentTime: 0,
paused: true,
hasData: false,
};

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

presence.on("iFrameData", (data: any) => {

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
videoData = { ...data, hasData: true };

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
});

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

presence.on("UpdateData", async () => {

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
const { pathname } = document.location;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

const presenceData: any = {
largeImageKey: "https://i.imgur.com/6XnAGga.jpeg",

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
largeImageText: "YummyAnime",

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
type: 3,
};

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

if (pathname === "/" || pathname === "/index.html") {

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.details = "На главной странице";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
presenceData.state = "Выбирает аниме";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
presence.setActivity(presenceData);

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
return;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

const isAnimePage = document.querySelector(".poster-block");

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

if (!isAnimePage) {
presenceData.details = "На сайте YummyAnime";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

const pageTitle = document.querySelector("h1")?.textContent?.trim();

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

if (pageTitle) {
presenceData.state = pageTitle;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
} else {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.
delete presenceData.state;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

delete presenceData.startTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
delete presenceData.endTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

presence.setActivity(presenceData);

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
return;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

const titleHeader = document.querySelector("h1");

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
if (titleHeader) {
presenceData.details = titleHeader.textContent?.trim();

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
} else {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.
presenceData.details = "Смотрит аниме";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

const posterImg = document.querySelector(
"div.poster-block img",

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
) as HTMLImageElement;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
if (posterImg && posterImg.src) {
if (posterImg.src.startsWith("//")) {

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.largeImageKey = `https:${posterImg.getAttribute("src")}`;

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
} else if (posterImg.src.startsWith("/")) {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.
presenceData.largeImageKey = `https://site.yummyani.me${posterImg.getAttribute("src")}`;

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
} else {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.
presenceData.largeImageKey = posterImg.src;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}
}

const activeBtn = document.querySelector('div[class*="pQCG"]');

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
let currentEpisode = "";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
if (activeBtn) {
const text = activeBtn.textContent?.trim();

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
if (text && !Number.isNaN(Number(text))) currentEpisode = text;

Check failure

Code scanning / ESLint

Newline after if Error

Expect newline after if

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

if (videoData.hasData) {
if (!videoData.paused) {
// === PLAY ===
presenceData.state = currentEpisode
? `Смотрит серию: ${currentEpisode}`
: "Смотрит видео";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

const now = Date.now();

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
const remainingMs = (videoData.duration - videoData.currentTime) * 1000;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

presenceData.endTimestamp = now + remainingMs;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

delete presenceData.startTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
} else {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.
presenceData.state = currentEpisode
? `Серия ${currentEpisode} (Пауза)`
: "На паузе";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

delete presenceData.startTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
delete presenceData.endTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}
} else {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.
const videoElement = document.querySelector("#video");

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
let isWatchingBlock = false;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.

if (videoElement) {
const rect = videoElement.getBoundingClientRect();

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
const viewHeight = Math.max(
document.documentElement.clientHeight,
window.innerHeight,
);

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
if (!(rect.bottom < 0 || rect.top - viewHeight >= 0))
isWatchingBlock = true;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

if (currentEpisode && isWatchingBlock) {
presenceData.state = `Готовится к просмотру: ${currentEpisode}`;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
} else {

Check failure

Code scanning / ESLint

Enforce consistent brace style for blocks Error

Closing curly brace appears on the same line as the subsequent block.
presenceData.state = "Читает описание";

Check failure

Code scanning / ESLint

Enforce the consistent use of either backticks, double, or single quotes Error

Strings must use singlequote.

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

delete presenceData.startTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
delete presenceData.endTimestamp;

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
}

presence.setActivity(presenceData);

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
});

Check failure

Code scanning / ESLint

Require or disallow semicolons instead of ASI Error

Extra semicolon.
Loading