Closed LancerComet closed 7 months ago
Now plugin can define a function named addReadHistory
in plugin code:
/**
* Add reading history to the target server.
*
* @param {string} url The manga chapter url that the Rulia requests to.
*/
async function addReadHistory (url: string) {
// Get necessary information from the url.
// For an example, the url is "https://www.my-manga-site.com/chapter/12450"
const chapterId = getChapterIdFromUrl(url) // 12450
await fetch('https://www.my-manga-site.com/reading-history/add', { ... })
}
Rulia invokes this function when every chapter opens.
Done
Available since 0.18.0.
Rulia will invoke "addReadHistory" function that provides by plugin to add reading history to target site.