2019-11-15 20:16:42 +00:00
|
|
|
// ==UserScript==
|
2022-01-12 23:02:54 +00:00
|
|
|
// @name AO3 Lazier
|
|
|
|
// @include https://archiveofourown.org/*
|
|
|
|
// @version 3.0
|
2019-11-15 20:16:42 +00:00
|
|
|
// ==/UserScript==
|
2022-01-12 23:02:54 +00:00
|
|
|
document.querySelectorAll('li.blurb').forEach(b=>{
|
|
|
|
i=b.querySelector('.heading a').href.match(/[0-9]+/)
|
|
|
|
b.innerHTML += `<div class="actions">
|
|
|
|
<a style="position:absolute;right:7em;top:.5em"
|
|
|
|
href='/downloads/${i}/*.epub'>Download</a></div>`})
|
|
|
|
|
|
|
|
b=document.createElement('a')
|
|
|
|
c=document.getElementsByTagName('option')
|
|
|
|
i=document.getElementsByClassName('chapter')[2]
|
|
|
|
b.innerText = 'Latest Chapter →'
|
|
|
|
b.href = c[c.length-1].value
|
|
|
|
i.parentElement.insertBefore(b, i)
|