Skip to content

Instantly share code, notes, and snippets.

@vdsabev
Last active June 30, 2023 02:14
Show Gist options
  • Save vdsabev/a31b161281dfe99fa5fae06a597470a5 to your computer and use it in GitHub Desktop.
Save vdsabev/a31b161281dfe99fa5fae06a597470a5 to your computer and use it in GitHub Desktop.
Bookmarklet - download all links on a page
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;
}
})();
Copy link

ghost commented Aug 29, 2019

Omg, thank you so much! This is way better than complicated macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment