Skip to content

Commit 4650b39

Browse files
committed
deploy: 57efa25
1 parent 3a29343 commit 4650b39

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

js/projects.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,6 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
// Put custom repo GitHub URLs in this object, keyed by nameWithOwner repo name.
7-
var customGithubURL = {
8-
"twitter/pants": "https://github.com/pantsbuild/pants",
9-
}
10-
11-
var getGithubURL = function(project) {
12-
return customGithubURL[project.nameWithOwner] || 'https://github.com/' + project.nameWithOwner
13-
}
14-
15-
16-
// Put custom repo Website URLs in this object, keyed by nameWithOwner repo name
17-
var customWebsiteURL = {
18-
"twitter/pants": "https://www.pantsbuild.org/",
19-
}
20-
21-
var getHomepageURL = function(project) {
22-
return customWebsiteURL[project.nameWithOwner] || project.homepageURL
23-
}
24-
256
/* Create project cards */
267
var renderProjects = function(projectsList, searchString="") {
278
// Parent div to hold all the project cards
@@ -71,14 +52,14 @@ var renderProjects = function(projectsList, searchString="") {
7152

7253
// GitHub link
7354
var githubLink = document.createElement('a')
74-
githubLink.href = getGithubURL(project)
55+
githubLink.href = `https://github.com/${project.nameWithOwner}`
7556
githubLink.innerHTML = "GitHub"
7657
githubLink.target = "_blank"
7758
githubLink.rel = "noopener"
7859
projectLinksDiv.appendChild(githubLink)
7960

8061
// Website link (with clause)
81-
var homepageURL = getHomepageURL(project)
62+
var homepageURL = project.homepageURL
8263
if (homepageURL != "") {
8364
var websiteLink = document.createElement('a')
8465
websiteLink.href = homepageURL

0 commit comments

Comments
 (0)