Skip to content

Instantly share code, notes, and snippets.

@mhsattarian
Created January 17, 2024 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhsattarian/673f2e3058b3791b75480ac489f4c2ed to your computer and use it in GitHub Desktop.
Save mhsattarian/673f2e3058b3791b75480ac489f4c2ed to your computer and use it in GitHub Desktop.
A simple contentScript Chrome extension to add a download button to Archillect images
const imgSrc = document.querySelector("#ii").src;
const soruces = document.querySelector("#sources");
const link = document.createElement("a");
link.textContent = "Download";
link.href = imgSrc.replace("66", "64");
link.download = "download";
link.target = "_blank";
link.style.width = "auto";
link.style.paddingInline = "10px";
soruces.appendChild(link);
{
"manifest_version": 3,
"name": "Archillect downloader",
"description": "some description!",
"version": "0.1",
"icons": { "64": "icon.png" },
"content_scripts": [
{
"matches": ["https://archillect.com/*"],
"js": ["content.js"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment