From adfede109ac56b31e3219d5db5a0f7319701c74d Mon Sep 17 00:00:00 2001 From: Albin Larsson Date: Thu, 16 Nov 2023 23:44:34 +0100 Subject: [PATCH] Update releases.js --- assets/js/releases.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/js/releases.js b/assets/js/releases.js index c2dbbea..383615f 100644 --- a/assets/js/releases.js +++ b/assets/js/releases.js @@ -24,6 +24,12 @@ jQuery(function($) { } const stableVer = stable.name || stable.tag_name; const devVer = dev.name || dev.tag_name; + if (stableVer.charAt(0) !== "v"){ + stableVer = `v${stableVer}` + } + if (devVer.charAt(0) !== "v"){ + devVer = `v${devVer}` + } var stableSelected = getDefaultReleaseOption() == 'stable'; @@ -38,10 +44,10 @@ jQuery(function($) { .addClass(!selectStable ? 'fa-dot-circle' : 'fa-circle'); $('#stable-release + .option-info') - .html('v' + stableVer + ' from ' + new Date(stable.published_at).toLocaleDateString() + + .html('' + stableVer + ' from ' + new Date(stable.published_at).toLocaleDateString() + ' Release notes.'); $('#dev-release + .option-info') - .html('v' + devVer + ' from ' + new Date(dev.published_at).toLocaleDateString() + + .html('' + devVer + ' from ' + new Date(dev.published_at).toLocaleDateString() + ' Release notes.'); var aurLink = selectStable ? 'https://aur.archlinux.org/packages/ulauncher/' :