Qidian Get Chapter Date

Fetches and displays the chapter dates for Qidian books

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Qidian Get Chapter Date
// @namespace    https://greasyfork.org/en/users/689482-quin15
// @version      1.1.0
// @description  Fetches and displays the chapter dates for Qidian books
// @author       Quin15
// @match        https://book.qidian.com/info/*
// @icon         https://www.google.com/s2/favicons?domain=qidian.com
// @grant        none
// ==/UserScript==

var checkElems = function() {if (document.querySelector('.volume .cf li')) {injectDates()} else {setTimeout(checkElems, 100);}};
checkElems();

var injectDates = function() {
    var chaplist = document.querySelectorAll('.volume .cf li')
    for (var i = 0; i < chaplist.length; i++) {
        var date = chaplist[i].firstElementChild.title.replace('首发时间:', '').substr(0, 10);
        var dateElem = document.createElement('div');
        dateElem.style = "width: 100%; color: #888; font-size: 12px; line-height: 0;";
        dateElem.innerText = date;
        chaplist[i].style.height = "50px";
        chaplist[i].firstElementChild.style.float = "none"
        chaplist[i].appendChild(dateElem)
    };
};