Files
mangabaka-seeder/scripts/userscript-banner.ts
T
Lucas WintherandClaude Opus 5.5 5b2ad867b3 feat: KakaoPage source (웹툰 and 웹소설), registered; correct the Tapas cookie claim
KakaoPage is read from its data endpoint (current covers) and from archived
server-rendered pages under both addresses (history). The userscript never sent
Tapas cookies (anonymous: true): docs and the age-check warning now say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:20:29 +02:00

22 lines
1.1 KiB
TypeScript

/** Tampermonkey/Violentmonkey metadata. @connect lists every host GM_xmlhttpRequest may reach. */
export function userscriptBanner(version: string, serverUrl?: string): string {
const connects = ["api.mangabaka.org", "webtoons.com", "pstatic.net", "tapas.io", "d30womf5coomej.cloudfront.net", "kakao.com", "kakaoentcdn.com", "web.archive.org", "catbox.moe"];
if (serverUrl) connects.push(new URL(serverUrl).hostname);
const lines = [
"// ==UserScript==",
"// @name MangaBaka Seeder",
"// @namespace https://gitea.lucaswinther.info/lucasw89/mangabaka-seeder",
`// @version ${version}`,
"// @description Find every cover of a WEBTOON, Tapas or KakaoPage series and turn them into a MangaBaka cover edit request",
"// @match https://mangabaka.org/*",
"// @grant GM_xmlhttpRequest",
"// @grant GM_getValue",
"// @grant GM_setValue",
"// @grant GM_deleteValue",
...connects.map((host) => `// @connect ${host}`),
"// @run-at document-idle",
"// ==/UserScript==",
];
return `${lines.join("\n")}\n\n`;
}