Created
December 17, 2025 10:46
-
-
Save tdewin/34d5d522d4218192ffc67423e3b96f41 to your computer and use it in GitHub Desktop.
download-all-images-in-browser-console.js
This file contains hidden or 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
| //download all images with class name icon or whatever you select | |
| //requires emulate user gesture checkbox in safari to run | |
| //set timeout seems to be required to get safari to download all individual icons | |
| let icons = document.getElementsByClassName("icon") | |
| for (let i=0;i<icons.length;i++) { | |
| setTimeout(() => { | |
| let alocal = document.createElement("a") | |
| alocal.setAttribute("download","") | |
| alocal.setAttribute("href",icons[i].getAttribute("src")) | |
| alocal.click(); | |
| console.log(icons[i].getAttribute("src")) | |
| },i*100); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment