@@ -96,7 +96,7 @@ <h1>Changelogs</h1>
9696 < br > Following is a list of changes made to Complementary products with possible exceptions</ p >
9797 < p > </ p >
9898
99- < button class ="aaccordion " style ="--ThemeColor: var(--ReimaginedColor); "> Complementary Reimagined</ button >
99+ < button class ="aaccordion aaReimBtn " style ="--ThemeColor: var(--ReimaginedColor); "> Complementary Reimagined</ button >
100100 < div class ="apanel " style ="margin-bottom: 40px; --ThemeColor: var(--ReimaginedColor); ">
101101 < p > </ p >
102102 < p > </ p >
@@ -157,7 +157,7 @@ <h1>Changelogs</h1>
157157 < p > </ p >
158158 < p > </ p >
159159 </ div >
160- < button class ="aaccordion " style ="--ThemeColor: var(--VersionFourColor); "> Complementary Shaders v4</ button >
160+ < button class ="aaccordion aaV4Btn " style ="--ThemeColor: var(--VersionFourColor); "> Complementary Shaders v4</ button >
161161 < div class ="apanel " style ="margin-bottom: 40px; --ThemeColor: var(--VersionFourColor); ">
162162 < p > </ p >
163163 < p > </ p >
@@ -481,42 +481,43 @@ <h1>Changelogs</h1>
481481 </ section > <!-- /.section-features -->
482482
483483 < script >
484- function load ( ) {
485- var cenR = document . getElementsByClassName ( "cenR" ) ;
486- var i ;
487- for ( i = 1 ; i < cenR . length + 1 ; i ++ ) {
484+ var accR = document . getElementsByClassName ( "aaReimBtn" ) ;
485+ accR [ 0 ] . addEventListener ( "click" , function ( ) {
486+ Array . from ( document . getElementsByClassName ( "cenR" ) ) . forEach ( function ( current , r , arr ) {
487+ var i = r + 1 ;
488488 var txtFile = new XMLHttpRequest ( ) ;
489489 var allText = "Entry can not be loaded." ;
490490 txtFile . onreadystatechange = function ( ) {
491- if ( txtFile . readyState === XMLHttpRequest . DONE && txtFile . status == 200 ) {
492- allText = txtFile . responseText ;
493- allText = allText . split ( "\n" ) . join ( "<br>" ) ;
494- }
491+ if ( txtFile . readyState === XMLHttpRequest . DONE && txtFile . status == 200 ) {
492+ allText = txtFile . responseText ;
493+ allText = allText . split ( "\n" ) . join ( "<br>" ) ;
494+ }
495495
496- document . getElementById ( "r" + i ) . innerHTML = allText ;
496+ document . getElementById ( "r" + i ) . innerHTML = allText ;
497497 }
498- txtFile . open ( "GET" , "/changelogs/reimagined-ch/r" + i + ".txt" , false ) ;
498+ txtFile . open ( "GET" , "/changelogs/reimagined-ch/r" + i + ".txt" , true ) ;
499499 txtFile . send ( null ) ;
500- }
500+ } ) ;
501+ } , { once : true } ) ;
501502
502- var cenV4 = document . getElementsByClassName ( "cenV4" ) ;
503- var i ;
504- for ( i = 1 ; i < cenV4 . length + 1 ; i ++ ) {
503+ var accV4 = document . getElementsByClassName ( "aaV4Btn" ) ;
504+ accV4 [ 0 ] . addEventListener ( "click" , function ( ) {
505+ Array . from ( document . getElementsByClassName ( "cenV4" ) ) . forEach ( function ( current , v , arr ) {
506+ var i = v + 1 ;
505507 var txtFile = new XMLHttpRequest ( ) ;
506508 var allText = "Entry can not be loaded." ;
507- txtFile . onreadystatechange = function ( ) {
508- if ( txtFile . readyState === XMLHttpRequest . DONE && txtFile . status == 200 ) {
509- allText = txtFile . responseText ;
510- allText = allText . split ( "\n" ) . join ( "<br>" ) ;
511- }
509+ txtFile . onreadystatechange = async function ( ) {
510+ if ( txtFile . readyState === XMLHttpRequest . DONE && txtFile . status == 200 ) {
511+ allText = txtFile . responseText ;
512+ allText = allText . split ( "\n" ) . join ( "<br>" ) ;
513+ }
512514
513- document . getElementById ( "v4" + i ) . innerHTML = allText ;
515+ document . getElementById ( "v4" + i ) . innerHTML = allText ;
514516 }
515- txtFile . open ( "GET" , "/changelogs/version4-ch/v4" + i + ".txt" , false ) ;
517+ txtFile . open ( "GET" , "/changelogs/version4-ch/v4" + i + ".txt" , true ) ;
516518 txtFile . send ( null ) ;
517- }
518- }
519- window . onLoad = load ( ) ;
519+ } ) ;
520+ } , { once : true } ) ;
520521
521522 var acc = document . getElementsByClassName ( "aaccordion" ) ;
522523 var i ;
0 commit comments