@@ -100,18 +100,21 @@ <h2>Loading...</h2>
100
100
101
101
const list = document . createElement ( "ul" ) ;
102
102
data . forEach ( ( el ) => {
103
- const listItem = document . createElement ( "li" ) ;
104
- const anchor = document . createElement ( "a" ) ;
103
+ // only show folders that start with a (year) number or contain release
104
+ if ( / ^ \d / . test ( el . name ) || el . name . startsWith ( "release_" ) ) {
105
+ const listItem = document . createElement ( "li" ) ;
106
+ const anchor = document . createElement ( "a" ) ;
105
107
106
- if ( el . type === "file" ) {
107
- anchor . setAttribute ( "href" , el . download_url ) ;
108
- } else if ( el . type === "dir" ) {
109
- anchor . setAttribute ( "href" , "?path=" + encodeURIComponent ( el . path ) ) ;
110
- }
108
+ if ( el . type === "file" ) {
109
+ anchor . setAttribute ( "href" , el . download_url ) ;
110
+ } else if ( el . type === "dir" ) {
111
+ anchor . setAttribute ( "href" , "?path=" + encodeURIComponent ( el . path ) ) ;
112
+ }
111
113
112
- anchor . textContent = el . name ;
113
- listItem . replaceChildren ( anchor ) ;
114
- list . appendChild ( listItem ) ;
114
+ anchor . textContent = el . name ;
115
+ listItem . replaceChildren ( anchor ) ;
116
+ list . appendChild ( listItem ) ;
117
+ }
115
118
} ) ;
116
119
const heading = document . createElement ( "h2" ) ;
117
120
const pathEl = document . createElement ( "code" ) ;
0 commit comments