Switch to Forgejo link

This commit is contained in:
bingus_violet 2024-04-21 19:13:18 -05:00
parent a07665962a
commit 6744165d3e

View file

@ -167,13 +167,13 @@ module.exports = {
}
async function updateCommits() {
var siteResponse = await (await fetch(`https://github.com/Violets-puragtory/Violets-Purgatory.dev/tree/${process.env.BRANCH || "origin"}`)).text()
var siteResponse = await (await fetch(`https://git.violets-purgatory.dev/bingus_violet/violets-purgatory/src/branch/${process.env.BRANCH || "origin"}`)).text()
var commits = siteResponse.substring(0, siteResponse.indexOf("Commits"))
// commits = commits.substring(commits.lastIndexOf("<b>") + 3, commits.lastIndexOf("</b>"))
commits = commits.substring(commits.lastIndexOf("<b>") + 3, commits.lastIndexOf("</b>"))
// ^ this works for Forgejo (codeberg)
commits = commits.substring(commits.lastIndexOf(">") + 1)
// commits = commits.substring(commits.lastIndexOf(">") + 1)
// ^ This works for Github (fuck you Github)
commitCount = commits.toString()