Created
July 12, 2020 19:44
-
-
Save smallfield/55dbb3381048538e085194516dd3afbc to your computer and use it in GitHub Desktop.
Footlocker画像表示 bookmarklet
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
var imgLinks = document.querySelectorAll(".slick-dots.slick-thumb img"); | |
imgLinks.forEach((img_tag, index) => { | |
const url = img_tag.src; | |
const parent = document.querySelector("div.ProductDetails-header"); | |
const link = document.createElement("a"); | |
console.log(img_tag.src.replace(/\?.*$/i, "?wid=1200&hei=1200")); | |
link.href = url.replace(/\?.*$/i, "?wid=1200&hei=1200"); | |
link.target = "_blank"; | |
link.download = true; | |
link.innerHTML = "Download " + (index + 1); | |
parent.appendChild(link); | |
parent.appendChild(document.createElement("br")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment