249249 color : # a0aec0 ;
250250 font-size : 0.9rem ;
251251 border-top : 1px solid rgba (255 , 255 , 255 , 0.1 );
252+ display : flex;
253+ flex-direction : column;
254+ gap : 15px ;
255+ }
256+
257+ .github-link {
258+ display : inline-flex;
259+ align-items : center;
260+ gap : 8px ;
261+ color : # 6bb1ff ;
262+ text-decoration : none;
263+ font-weight : 500 ;
264+ padding : 8px 16px ;
265+ border-radius : 6px ;
266+ background : rgba (107 , 177 , 255 , 0.1 );
267+ transition : all 0.3s ease;
268+ border : 1px solid rgba (107 , 177 , 255 , 0.2 );
269+ }
270+
271+ .github-link : hover {
272+ background : rgba (107 , 177 , 255 , 0.2 );
273+ color : # ff5b5b ;
274+ transform : translateY (-2px );
275+ }
276+
277+ .custom-version-section {
278+ background : rgba (20 , 20 , 36 , 0.5 );
279+ border-radius : 8px ;
280+ overflow : hidden;
281+ box-shadow : 0 4px 15px rgba (0 , 0 , 0 , 0.2 );
282+ margin-top : 20px ;
283+ }
284+
285+ .custom-version-input {
286+ display : flex;
287+ align-items : center;
288+ gap : 10px ;
289+ }
290+
291+ .custom-version-input input {
292+ flex : 1 ;
293+ }
294+
295+ .custom-version-btn {
296+ background : rgba (107 , 177 , 255 , 0.2 );
297+ color : white;
298+ border : none;
299+ padding : 14px 20px ;
300+ border-radius : 10px ;
301+ cursor : pointer;
302+ transition : all 0.3s ease;
303+ border : 1px solid rgba (107 , 177 , 255 , 0.3 );
304+ }
305+
306+ .custom-version-btn : hover {
307+ background : rgba (107 , 177 , 255 , 0.3 );
252308 }
253309
254310 @media (max-width : 768px ) {
263319 .version-grid {
264320 grid-template-columns : repeat (auto-fill, minmax (90px , 1fr ));
265321 }
322+
323+ .custom-version-input {
324+ flex-direction : column;
325+ }
326+
327+ .custom-version-btn {
328+ width : 100% ;
329+ }
266330 }
267331 </ style >
268332</ head >
@@ -309,6 +373,24 @@ <h1>StaticAbletonDownloader</h1>
309373 < div class ="version-sections " id ="version-sections ">
310374 <!-- Version sections will be populated by JS -->
311375 </ div >
376+
377+ <!-- Custom Version Section -->
378+ < div class ="custom-version-section ">
379+ < div class ="section-header ">
380+ Custom Version
381+ </ div >
382+ < div class ="section-content ">
383+ < div class ="custom-version-input ">
384+ < input type ="text " id ="custom-version-input " placeholder ="Enter version (e.g., 12.3.1) ">
385+ < button class ="custom-version-btn " id ="custom-version-btn ">
386+ Use Custom Version
387+ </ button >
388+ </ div >
389+ < p style ="margin-top: 10px; font-size: 0.9rem; color: #a0aec0; ">
390+ Enter a version not listed above. Format: Major.Minor.Patch (e.g., 12.3.1)
391+ </ p >
392+ </ div >
393+ </ div >
312394 </ div >
313395
314396 < button class ="btn " id ="download-btn ">
@@ -326,7 +408,10 @@ <h1>StaticAbletonDownloader</h1>
326408 </ div >
327409
328410 < footer >
329- < a href ="https://github.com/devilAPI/StaticAbletonDownloader/ "> GitHub</ a >
411+ < a href ="https://github.com/devilAPI/StaticAbletonDownloader/ " class ="github-link ">
412+ < i class ="fab fa-github "> </ i > View on GitHub
413+ </ a >
414+ < p > StaticAbletonDownloader © 2023</ p >
330415 </ footer >
331416 </ div >
332417
@@ -464,6 +549,9 @@ <h1>StaticAbletonDownloader</h1>
464549 } ) ;
465550 // Add selected class to clicked item
466551 versionItem . classList . add ( 'selected' ) ;
552+
553+ // Clear custom version input
554+ document . getElementById ( 'custom-version-input' ) . value = '' ;
467555 } ) ;
468556
469557 grid . appendChild ( versionItem ) ;
@@ -475,19 +563,52 @@ <h1>StaticAbletonDownloader</h1>
475563 versionSections . appendChild ( section ) ;
476564 } ) ;
477565
566+ // Custom version button event listener
567+ document . getElementById ( 'custom-version-btn' ) . addEventListener ( 'click' , function ( ) {
568+ const customVersion = document . getElementById ( 'custom-version-input' ) . value . trim ( ) ;
569+
570+ if ( ! customVersion ) {
571+ alert ( "Please enter a version number" ) ;
572+ return ;
573+ }
574+
575+ // Validate version format (basic check)
576+ const versionPattern = / ^ \d + ( \. \d + ) { 0 , 2 } $ / ;
577+ if ( ! versionPattern . test ( customVersion ) ) {
578+ alert ( "Please enter a valid version number (e.g., 12.3.1)" ) ;
579+ return ;
580+ }
581+
582+ // Remove selected class from all version items
583+ document . querySelectorAll ( '.version-item' ) . forEach ( item => {
584+ item . classList . remove ( 'selected' ) ;
585+ } ) ;
586+
587+ // Show custom version as selected
588+ document . getElementById ( 'custom-version-input' ) . style . borderColor = '#6bb1ff' ;
589+ document . getElementById ( 'custom-version-input' ) . style . boxShadow = '0 0 0 3px rgba(107, 177, 255, 0.3)' ;
590+ } ) ;
591+
478592 // Download button event listener
479593 document . getElementById ( 'download-btn' ) . addEventListener ( 'click' , function ( ) {
480594 const os = document . getElementById ( 'os-select' ) . value ;
481595 const edition = document . getElementById ( 'edition-select' ) . value ;
596+
597+ // Check if a version is selected or custom version is entered
482598 const selectedVersion = document . querySelector ( '.version-item.selected' ) ;
599+ const customVersion = document . getElementById ( 'custom-version-input' ) . value . trim ( ) ;
600+
601+ let version ;
483602
484- if ( ! selectedVersion ) {
485- alert ( "Please select a version" ) ;
603+ if ( selectedVersion ) {
604+ version = selectedVersion . dataset . version ;
605+ } else if ( customVersion ) {
606+ version = customVersion ;
607+ } else {
608+ alert ( "Please select a version or enter a custom version" ) ;
486609 return ;
487610 }
488611
489- // Use data attribute for reliability
490- const version = selectedVersion . dataset . version ;
491612 let url = "https://cdn-downloads.ableton.com/channels/" ;
492613
493614 url += `${ version } /ableton_live_${ edition } _${ version } ` ;
0 commit comments