64 Series 0 Comments 6799 Views 6 Follows Mar 27, 2022kaczo24
No Tags
Stuff I read and liked enough to put here
Sorted, albeit roughly... more>>
to sort by last updated put in console:let novels = (await Promise.all([...new Array( +[...document.getElementsByClassName("digg_pagination")[0].children].filter(x=>x.className != "previous_page" && x.className != "next_page").at(-1).innerText ).keys()].map(async (n)=> {return [...new DOMParser().parseFromString(await (await fetch(document.location.origin + document.location.pathname + `?pg=${1+n}`)).text(), "text/html").getElementsByClassName("aj_reload")[0].childNodes].filter(x=>x.classList[0] == "search_main_box_nu")}))).reduce((p,n)=>[...p, ...n],[]).sort((a,b)=>new Date(b.children[1].children[1].children[4].innerText)-new Date(a.children[1].children[1].children[4].innerText));document.getElementsByClassName("aj_reload")[0].replaceChildren(...novels);novels.forEach(async n => {let dom = new DOMParser().parseFromString(await (await fetch(n.children[1].children[0].children[2].href)).text(), "text/html");let bad = [...dom.getElementsByTagName("style")].find(x=> x.innerText.match(/.chp-release./)).innerText.match(/chp-release.rand\d+/)[0].replace(".", " ");let god = document.createElement("a");god.href = [...dom.getElementById("myTable").children[1].children[0].children[2].children].find(x=>x.className != bad).href;god.append(n.children[0]);n.prepend(god);});
<<less