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
let IMG_CLASS = '.slide_image'; | |
let IMG_URL_ATTR = 'data-full'; | |
let imgName = 0; | |
[...document.querySelectorAll(IMG_CLASS)].map(el => setTimeout(() => { | |
let link = document.createElement('a'); | |
link.download = imgName++; | |
link.href = el.getAttribute(IMG_URL_ATTR) || el.getAttribute('src'); | |
document.body.appendChild(link); | |
link.click(); | |
document.body.removeChild(link); |