-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
20 lines (19 loc) · 813 Bytes
/
Copy pathscript.js
File metadata and controls
20 lines (19 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
async function main() {
const apiUrl = "https://api.github.com/users/Chiroyce1/repos";
const repos = await (await fetch(apiUrl)).json();
const exceptions = ["Chiroyce1", "markdown"];
repos.forEach((repo) => {
if (!repo.fork && !repo.archived && !exceptions.includes(repo.name)) {
let card = document.createElement("a");
let img = document.createElement("img");
let imgUrl = `https://github-readme-stats.vercel.app/api/pin/?username=Chiroyce1&repo=${repo.name}&show_owner=true&theme=tokyonight&description_lines_count=2&hide_border=true&icon_color=4f85e2`;
img.src = imgUrl;
img.classList.add("repo");
card.href = repo.html_url;
card.appendChild(img);
document.querySelector(".repos").appendChild(card);
}
});
document.querySelector(".loading").style.display = "none";
}
main();