refactor: 移除除錯用程式碼

This commit is contained in:
noeFly
2025-06-21 23:21:15 +08:00
parent 07a8234731
commit be77d0e214

View File

@@ -54,7 +54,6 @@ export function GitlabCardComponent(properties, children) {
{ type: "text/javascript", defer: true }, { type: "text/javascript", defer: true },
` `
fetch('https://gitlab.com/api/v4/projects/${repoE}').then(response => response.json()).then(data => { fetch('https://gitlab.com/api/v4/projects/${repoE}').then(response => response.json()).then(data => {
console.log(data);
document.getElementById('${cardUuid}-repo').innerText = data.name; document.getElementById('${cardUuid}-repo').innerText = data.name;
document.getElementById('${cardUuid}-description').innerText = data.description?.replace(/:[a-zA-Z0-9_]+:/g, '') || "Description not set"; document.getElementById('${cardUuid}-description').innerText = data.description?.replace(/:[a-zA-Z0-9_]+:/g, '') || "Description not set";
document.getElementById('${cardUuid}-forks').innerText = Intl.NumberFormat('en-us', { notation: "compact", maximumFractionDigits: 1 }).format(data.forks_count).replaceAll("\u202f", ''); document.getElementById('${cardUuid}-forks').innerText = Intl.NumberFormat('en-us', { notation: "compact", maximumFractionDigits: 1 }).format(data.forks_count).replaceAll("\u202f", '');