prettier
This commit is contained in:
@@ -21,6 +21,7 @@ async function getDownload(href: string): Promise<string | null> {
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function attachFetchDownloadLink(a: HTMLLinkElement, depth = 0) {
|
||||
function run() {
|
||||
a.innerText = 'Loading'
|
||||
@@ -42,6 +43,7 @@ function attachFetchDownloadLink(a: HTMLLinkElement, depth = 0) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (depth > 5) return
|
||||
|
||||
if (onhover) {
|
||||
@@ -50,6 +52,7 @@ function attachFetchDownloadLink(a: HTMLLinkElement, depth = 0) {
|
||||
run()
|
||||
}
|
||||
}
|
||||
|
||||
addEventListener('load', () => {
|
||||
document.querySelectorAll<HTMLLinkElement>('a').forEach(a => {
|
||||
let href = new URL(a.href)
|
||||
|
||||
Reference in New Issue
Block a user