Skip to content

Commit

Permalink
Merge pull request #8 from veekaybee/non_standard_link
Browse files Browse the repository at this point in the history
Remove redundant repo URL display in feed posts
  • Loading branch information
veekaybee authored Jan 4, 2025
2 parents e44d081 + a16edc0 commit 20c0275
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ export async function fetchPosts() {
const repoHeader = card.querySelector('.repo-header');
const repoUrl = card.querySelector('.post-link a').getAttribute('href');
console.log("RepoURL " + repoUrl)
let link = `<a href="$repoUrl" target="_blank" rel="noopener noreferrer">${repoUrl}</a>`
repoHeader.innerHTML = link;
const githubMatch = isGithubRepo(repoUrl);
if (githubMatch && githubMatch[0]) {
try {
Expand All @@ -212,6 +210,8 @@ export async function fetchPosts() {
console.error('Error fetching GitHub data for post:', error);
}
} else {
let link = `<a href="$repoUrl" target="_blank" rel="noopener noreferrer">${repoUrl}</a>`
repoHeader.innerHTML = link;
continue;
}
}
Expand Down

0 comments on commit 20c0275

Please sign in to comment.