mirror of
https://github.com/tycrek/degoogle.git
synced 2025-08-22 22:34:36 +02:00
Merge pull request #351 from StephenBrown2/open-source-repo-key
This commit is contained in:
18
_build.js
18
_build.js
@@ -118,7 +118,10 @@ function generateServiceSection(data) {
|
|||||||
let text = item.text.trim();
|
let text = item.text.trim();
|
||||||
|
|
||||||
// Append the F-Droid badge to the name
|
// Append the F-Droid badge to the name
|
||||||
if (item.fdroid) name = name.concat(' ' + fdroidLink(item.fdroid));
|
if (item.fdroid) name = name.concat('<br/>', fdroidLink(item.fdroid));
|
||||||
|
|
||||||
|
// Append the Repo badge to the name
|
||||||
|
if (item.repo) name = name.concat('<br/>', repoLink(item.repo));
|
||||||
|
|
||||||
// Build the row
|
// Build the row
|
||||||
let tableItem = `| ${name} | ${eyes} | ${text} |`;
|
let tableItem = `| ${name} | ${eyes} | ${text} |`;
|
||||||
@@ -136,7 +139,18 @@ function generateServiceSection(data) {
|
|||||||
* @param {String} appId The package identifier on F-Droid
|
* @param {String} appId The package identifier on F-Droid
|
||||||
*/
|
*/
|
||||||
function fdroidLink(appId) {
|
function fdroidLink(appId) {
|
||||||
return `[](https://f-droid.org/en/packages/${appId}/)`;
|
return `[](https://f-droid.org/en/packages/${appId}/)`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a badge acting as a link to a source repository for an app.
|
||||||
|
* @param {String} repo The repository url
|
||||||
|
*/
|
||||||
|
function repoLink(repo) {
|
||||||
|
let repoURL = new URL(repo);
|
||||||
|
let repoHost = path.basename(repoURL.hostname, path.extname(repoURL.hostname))
|
||||||
|
if (repoHost.includes(".")) repoHost = path.extname(repoHost).replace(".", "")
|
||||||
|
return `[](${repo})`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
1461
yaml/degoogle.yml
1461
yaml/degoogle.yml
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user