Last active
June 30, 2023 02:14
-
-
Save vdsabev/a31b161281dfe99fa5fae06a597470a5 to your computer and use it in GitHub Desktop.
Bookmarklet - download all links on a page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(() => { | |
const items = document.querySelectorAll('a'); | |
let delay = 0; | |
for (let index = 0; index < items.length; index++) { | |
const item = items[index]; | |
item.setAttribute('download', item.getAttribute('href')); | |
setTimeout(() => item.click(), delay); | |
delay += 500; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Omg, thank you so much! This is way better than complicated macros.