Bilibili Show Chapter Date

Fetches and displays the chapter dates for Bilibili manhua

当前为 2021-04-10 提交的版本,查看 最新版本

// ==UserScript==
// @name         Bilibili Show Chapter Date
// @namespace    https://gf.qytechs.cn/en/users/689482-quin15
// @version      0.1.3
// @description  Fetches and displays the chapter dates for Bilibili manhua
// @author       You
// @match        https://manga.bilibili.com/detail*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

setTimeout(function(){
    fetch("https://manga.bilibili.com/twirp/comic.v1.Comic/ComicDetail?device=pc&platform=web", {
        "headers": {
            "accept": "application/json, text/plain, */*",
            "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
            "content-type": "application/json;charset=UTF-8"
        },
        "referrer": "https://manga.bilibili.com",
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": "{\"comic_id\":" + document.location.href.split('/').reverse()[0].split('?')[0].replace('mc', '') + "}",
        "method": "POST"
    }).then((response) => {
        response.json().then((data) => {
            var elemDates = data.data.ep_list.reverse();
            //console.log(elemDates);
            var episodes = document.querySelectorAll('.list-data button');
            for (var i = 0; i < episodes.length; i++) {
                var dateElem = document.createElement('div');
                dateElem.style = "width: 100%; color: #888; font-size: 12px";
                dateElem.innerText = elemDates[i].pub_time.slice(0,10);
                episodes[i].style.height = "";
                episodes[i].style.flexFlow = "wrap";
                episodes[i].appendChild(dateElem);
            };
        });
    });
}, 1200);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址