Skip to content

Instantly share code, notes, and snippets.

View vasT47's full-sized avatar

vasT vasT47

View GitHub Profile
@alyti
alyti / bookmarklet
Last active June 16, 2024 16:54
Download mods from ageofempires.com
javascript:(function() {
let id = parseInt(location.pathname.match("([0-9]{1,5})")[0], 10); if (id === NaN) {return};
fetch("https://api.ageofempires.com/api/v1/mods/Download", {"credentials": "include", "headers": { "Content-Type": "application/json" }, "body": JSON.stringify({id, boolValue: true}), "method": "POST", "mode": "cors"}).then(r => r.json()).then(r => {location.href = r.value.downloadUrl}).catch(e => console.log(e));
})()