Open Skateside opened 2 years ago
const regexp = (/url\((['"]?)([^\1)]+)\1\)/);
const backgroundImages = [/* array here */];
const sources = backgroundImages
.map((string) => string.match(new RegExp(regexp, "g")))
.filter(Boolean)
.map((matches) => matches.map((str) => str.match(regexp)?.[2]))
.flat();
// sources contains an array of all background image URLs found.
Could be useful when you're going somewhere with spotty a internet connection. A dialog could download all images so your phone has them cached.
It's possible to go through the stylesheets to read all the background images (including their hashes) and the characters each have their own image.