File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
- document . addEventListener ( 'DOMContentLoaded' , function ( ) {
1
+ document . addEventListener ( 'DOMContentLoaded' , async function ( ) {
2
2
3
3
// rather than looking for it all the time, you could just create an enum and change this once than updating every line
4
4
const github = {
5
5
repo : 'https://github.com/lapce/lapce' ,
6
- version : 'v0.2.7' ,
6
+ version : ( await ( await fetch ( "https://api.github.com/repos/lapce/lapce/releases/latest" ) ) . json ( ) ) . name ,
7
7
windows : 'Lapce-windows.msi' ,
8
8
linux : 'Lapce-linux.tar.gz' ,
9
9
macos : 'Lapce-macos.dmg'
@@ -83,4 +83,4 @@ document.addEventListener('DOMContentLoaded', function () {
83
83
download . setAttribute ( "href" , `${ github . repo } /releases/download/${ github . version } /${ github . linux } ` )
84
84
break ;
85
85
}
86
- } ) ;
86
+ } ) ;
You can’t perform that action at this time.
0 commit comments