Greasy Fork is available in English.

mikananiBgmScore

Mikan 蜜柑计划首页显示 Bangumi 评分 / 标签 / 链接。

< Feedback on mikananiBgmScore

Review: Good - script works

§
Posted: 2024-07-05

感谢作者开发的扩展,非常好用~

如果有用户和我一样希望能查询nsfw类番剧的信息(而不是显示0.1分),可以手动修改一下代码。找到下面这个函数

async function getJSON(url) {
    try {
        const response = await fetch(url);
        logger.info(`fetch ${url}`)
        if (response.status >= 200 && response.status < 400)
            return await response.json();
        console.error(`Error fetching ${url}:`, response.status, response.statusText, await response.text());
    }
    catch (e) {
        console.error(`Error fetching ${url}:`, e);
    }
}

把其中的const response = await fetch(url); 改为 const response = await fetch(url, {headers: {'Authorization': 'Bearer YOUR_TOKEN'}}); 其中的YOUR_TOKEN需要换成你自己的Bangumi账号的token (可以到 https://next.bgm.tv/demo/access-token 申请)

Post reply

Sign in to post a reply.