Skip to content

Instantly share code, notes, and snippets.

@mems
Last active May 21, 2025 05:25
Show Gist options
  • Save mems/5a87941e00c8c15954ce to your computer and use it in GitHub Desktop.
Save mems/5a87941e00c8c15954ce to your computer and use it in GitHub Desktop.
Fullres images of a https://www.fashionanthology.com/ galleries
javascript:(function()%7Bconst%20e%3Ddocument.title.split(%2F%5Cs%2B%5C%7C%5Cs%2B%2F).slice(1).join(%22%20%22)%3Bdocument.head.insertAdjacentHTML(%22beforeend%22%2C%22%3Cstyle%3E.pictures%7Bmargin%3A0px%20calc((100vw%20-%20993px)%20%2F%20-2)%3Bpadding%3A10px%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3B%7D.picture-wrap%7Bwidth%3A400px%3Bflex-grow%3A1%3Bbox-sizing%3Aborder-box%3Bpadding%3A10px%3B%7D.picture%7Bwidth%3A%20100%25%3Bmin-height%3A%20400px%7D%3C%2Fstyle%3E%22)%3Bconst%20t%3Ddocument.querySelector(%22.bigphoto%22)%2Cr%3Dt.querySelector(%22img%22).src.replace(%2F%5Cd%2B(_(xs%7Cm))%3F.jpg%2F%2C%22%22)%2Ci%3D(e%2Ct%3D%7B%7D%2Cr%3D%5B%5D)%3D%3E%7Bconst%20i%3DObject.assign(document.createElement(e)%2Ct)%3Breturn%20i.append(...Array.from(r))%2Ci%7D%2Ca%3D(e%2Ct)%3D%3Ei(%22a%22%2C%7BclassName%3A%22picture-wrap%22%2Cdownload%3At%2Chref%3Ae%7D%2C%5Bi(%22img%22%2C%7BclassName%3A%22picture%22%2Cloading%3A%22lazy%22%2Csrc%3Ae%2Conerror%3Afunction()%7Bthis.parentElement.remove()%7D%7D)%5D)%3Bt.remove()%2Cdocument.querySelector(%22.allphotos%22).replaceWith(i(%22div%22%2C%7BclassName%3A%22pictures%22%7D%2Cfunction*()%7Bfor(let%20t%3D1%3Bt%3C%3D999%3Bt%2B%2B)%7Bconst%20i%3D%60%24%7Be%7D%20%24%7Bt%7D.jpg%60%3Byield%20a(r%2BString(t).padStart(2%2C%220%22)%2B%22.jpg%22%2Ci)%2Ct%3C100%26%26(yield%20a(r%2BString(t).padStart(3%2C%220%22)%2B%22.jpg%22%2Ci))%7D%7D()))%7D)()
const title = document.title.split(/\s+\|\s+/).slice(1).join(" ");
document.head.insertAdjacentHTML("beforeend", "<style>.pictures{margin:0px calc((100vw - 993px) / -2);padding:10px;display:flex;flex-wrap:wrap;}.picture-wrap{width:400px;flex-grow:1;box-sizing:border-box;padding:10px;}.picture{width: 100%;min-height: 400px}</style>");
const imgWrapper = document.querySelector(".bigphoto");
const base = imgWrapper.querySelector("img").src.replace(/\d+(_(xs|m))?.jpg/, "");
const createElement = (name, attrs = {}, children = []) => {
const el = Object.assign(document.createElement(name), attrs);
el.append(...Array.from(children));
return el;
};
const createPicture = (src, download) => createElement("a", {
className: "picture-wrap",
download,
href: src,
},
[createElement("img", {
className: "picture",
loading: "lazy",
src,
onerror: function(){this.parentElement.remove()}
})]
);
imgWrapper.remove();
document.querySelector(".allphotos").replaceWith(createElement("div", {className: "pictures"}, (function*(){
for (let i = 1; i <= 999; i++) {
const download = `${title} ${i}.jpg`;
yield createPicture(base + String(i).padStart(2, "0") + ".jpg", download);
if(i < 100) {
yield createPicture(base + String(i).padStart(3, "0") + ".jpg", download);
}
}
})()));
@whatkatedid
Copy link

Can you give any hints for Bloomsbury's archive? thanks in advance 💓

@phps31
Copy link

phps31 commented Dec 29, 2022

Hi! @mems
Do you have any bookmarks to access the Bloomsbury Fashion Central website archives? Thanks in advance.

@evianapetropoulou
Copy link

Bonjour,
D'abord, merci beaucoup pour cet outil !
Je vous écris parce que j'ai essayé de l'utiliser mais je crois qu'il ne fonctionne plus/a été bloqué par le site. J'ai vérifié avec 2 navigateurs (Chrome et Firefox) et je crois que j'ai bien suivi les instructions parce qu'il marchait correctement avant.
Si vous avez le temps de vérifier/fixer le bug, ça serait très gentil.
Merci !

@wellnoo
Copy link

wellnoo commented Sep 9, 2024

This has been such a lifesaver for me for my uni projects but they blocked it, stopped working as of today :( Is there any way you can update it. Thank you so much for making it in the first place. I'll forever be grateful for this

@mems
Copy link
Author

mems commented Sep 11, 2024

@evianapetropoulou, @wellnoo I updated it / J'ai mis à jour.

@mems
Copy link
Author

mems commented Sep 11, 2024

@alexyustudent @phps31 @whatkatedid I need a freely available example to see if it's possible to do something to get the content without require a subscription

@evianapetropoulou
Copy link

Merci beaucoup !!! Ça marche pour moi !

@wellnoo
Copy link

wellnoo commented Sep 15, 2024

thanks a lot :)

@mems
Copy link
Author

mems commented Jan 3, 2025

I've just tried right now and don't find any issue

@mems
Copy link
Author

mems commented Feb 24, 2025

I see what the problem is, the link to the source code was wrong. You can update your bookmarklet (see the instructions). It should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment