diff --git a/modules/page-renderer.js b/modules/page-renderer.js index 6e852f61..567701e1 100644 --- a/modules/page-renderer.js +++ b/modules/page-renderer.js @@ -1,4 +1,5 @@ import { services, appName, authorInfo, version, quality, repo, donations } from "./config.js"; +import { getCommitInfo } from "./sub/current-commit.js"; import loc from "./sub/loc.js"; let s = services @@ -19,6 +20,7 @@ for (let i in donations) { donate += `
${i} (${loc("en", 'desc', 'clickToCopy').trim()})
${donations[i]}
` } +let com = getCommitInfo(); export default function(obj) { let isIOS = obj.useragent.toLowerCase().match("iphone os") try { @@ -85,10 +87,10 @@ export default function(obj) { diff --git a/modules/sub/current-commit.js b/modules/sub/current-commit.js index 869ff785..140fb209 100644 --- a/modules/sub/current-commit.js +++ b/modules/sub/current-commit.js @@ -4,5 +4,7 @@ export function shortCommit() { return execSync('git rev-parse --short HEAD').toString().trim() } export function getCommitInfo() { - return execSync(`git show -s --format='%s;;;%B'`).toString().trim().slice(1,-1).replace(/[\r\n]/gm, '\n').split(';;;') + let d = execSync(`git show -s --format='%s;;;%B'`).toString().trim().slice(1,-1).replace(/[\r\n]/gm, '\n').split(';;;') + d[1] = d[1].replace(d[0], '').trim().toString().replace(/[\r\n]/gm, '
') + return d } \ No newline at end of file