Last active
April 25, 2020 19:47
-
-
Save gregwhitworth/f9384f1626e0037cdefb2ae11dde4ca0 to your computer and use it in GitHub Desktop.
Get URLs to all Shopify urls
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
/* | |
Go to your files page under Settings -> Files | |
Open the devtools and run this script | |
You'll then inputTextArr which is an array of all CDN values for files on the page. | |
*/ | |
let anchors = [] | |
let inputTextArr = []; | |
let images = []; | |
document.querySelectorAll('td:nth-child(4) input').forEach((e) => { inputTextArr.push(e.value)}); | |
document.querySelectorAll('table tr td:nth-child(3) a').forEach((e) => { anchors.push(e.textContent)}); | |
anchors.forEach((anchor, i) => { | |
let href = inputTextArr[i]; | |
images.push({ | |
name: anchor, | |
href: inputTextArr[i] | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment