@@ -46,7 +46,7 @@ const loggerLanding = LoggerUtil.getLogger('Landing')
4646
4747/** 
4848 * Show/hide the loading area. 
49-  *   
49+  * 
5050 * @param  {boolean } loading True if the loading area should be shown, otherwise false. 
5151 */ 
5252function  toggleLaunchArea ( loading ) { 
@@ -61,7 +61,7 @@ function toggleLaunchArea(loading){
6161
6262/** 
6363 * Set the details text of the loading area. 
64-  *   
64+  * 
6565 * @param  {string } details The new text for the loading details. 
6666 */ 
6767function  setLaunchDetails ( details ) { 
@@ -70,7 +70,7 @@ function setLaunchDetails(details){
7070
7171/** 
7272 * Set the value of the loading progress bar and display that value. 
73-  *   
73+  * 
7474 * @param  {number } percent Percentage (0-100) 
7575 */ 
7676function  setLaunchPercentage ( percent ) { 
@@ -81,7 +81,7 @@ function setLaunchPercentage(percent){
8181
8282/** 
8383 * Set the value of the OS progress bar and display that on the UI. 
84-  *   
84+  * 
8585 * @param  {number } percent Percentage (0-100) 
8686 */ 
8787function  setDownloadPercentage ( percent ) { 
@@ -91,7 +91,7 @@ function setDownloadPercentage(percent){
9191
9292/** 
9393 * Enable or disable the launch button. 
94-  *   
94+  * 
9595 * @param  {boolean } val True to enable, false to disable. 
9696 */ 
9797function  setLaunchEnabled ( val ) { 
@@ -135,10 +135,8 @@ document.getElementById('settingsMediaButton').onclick = async e => {
135135
136136// Bind avatar overlay button. 
137137document . getElementById ( 'avatarOverlay' ) . onclick  =  async  e  =>  { 
138-     await  prepareSettings ( ) 
139-     switchView ( getCurrentView ( ) ,  VIEWS . settings ,  500 ,  500 ,  ( )  =>  { 
140-         settingsNavItemListener ( document . getElementById ( 'settingsNavAccount' ) ,  false ) 
141-     } ) 
138+     e . target . blur ( ) 
139+     await  toggleAccountSelection ( true ,  true ) 
142140} 
143141
144142// Bind selected account 
@@ -192,7 +190,7 @@ const refreshMojangStatuses = async function(){
192190        loggerLanding . warn ( 'Unable to refresh Mojang service status.' ) 
193191        statuses  =  MojangRestAPI . getDefaultStatuses ( ) 
194192    } 
195-      
193+ 
196194    greenCount  =  0 
197195    greyCount  =  0 
198196
@@ -229,7 +227,7 @@ const refreshMojangStatuses = async function(){
229227            status  =  'green' 
230228        } 
231229    } 
232-      
230+ 
233231    document . getElementById ( 'mojangStatusEssentialContainer' ) . innerHTML  =  tooltipEssentialHTML 
234232    document . getElementById ( 'mojangStatusNonEssentialContainer' ) . innerHTML  =  tooltipNonEssentialHTML 
235233    document . getElementById ( 'mojang_status_icon' ) . style . color  =  MojangRestAPI . statusToHex ( status ) 
@@ -263,7 +261,7 @@ const refreshServerStatus = async (fade = false) => {
263261        document . getElementById ( 'landingPlayerLabel' ) . innerHTML  =  pLabel 
264262        document . getElementById ( 'player_count' ) . innerHTML  =  pVal 
265263    } 
266-      
264+ 
267265} 
268266
269267refreshMojangStatuses ( ) 
@@ -276,7 +274,7 @@ let serverStatusListener = setInterval(() => refreshServerStatus(true), 300000)
276274
277275/** 
278276 * Shows an error overlay, toggles off the launch area. 
279-  *   
277+  * 
280278 * @param  {string } title The overlay title. 
281279 * @param  {string } desc The overlay description. 
282280 */ 
@@ -295,8 +293,8 @@ function showLaunchFailure(title, desc){
295293
296294/** 
297295 * Asynchronously scan the system for valid Java installations. 
298-  *   
299-  * @param  {boolean } launchAfter Whether we should begin to launch after scanning.   
296+  * 
297+  * @param  {boolean } launchAfter Whether we should begin to launch after scanning. 
300298 */ 
301299async  function  asyncSystemScan ( effectiveJavaOptions ,  launchAfter  =  true ) { 
302300
@@ -321,7 +319,7 @@ async function asyncSystemScan(effectiveJavaOptions, launchAfter = true){
321319        setOverlayHandler ( ( )  =>  { 
322320            setLaunchDetails ( Lang . queryJS ( 'landing.systemScan.javaDownloadPrepare' ) ) 
323321            toggleOverlay ( false ) 
324-              
322+ 
325323            try  { 
326324                downloadJava ( effectiveJavaOptions ,  launchAfter ) 
327325            }  catch ( err )  { 
@@ -512,7 +510,7 @@ async function dlAsync(login = true) {
512510        showLaunchFailure ( Lang . queryJS ( 'landing.dlAsync.errorDuringFileVerificationTitle' ) ,  err . displayable  ||  Lang . queryJS ( 'landing.dlAsync.seeConsoleForDetails' ) ) 
513511        return 
514512    } 
515-      
513+ 
516514
517515    if ( invalidFileCount  >  0 )  { 
518516        loggerLaunchSuite . info ( 'Downloading files.' ) 
@@ -656,8 +654,8 @@ let newsGlideCount = 0
656654
657655/** 
658656 * Show the news UI via a slide animation. 
659-  *   
660-  * @param  {boolean } up True to slide up, otherwise false.   
657+  * 
658+  * @param  {boolean } up True to slide up, otherwise false. 
661659 */ 
662660function  slide_ ( up ) { 
663661    const  lCUpper  =  document . querySelector ( '#landingContainer > #upper' ) 
@@ -731,7 +729,7 @@ let newsLoadingListener = null
731729
732730/** 
733731 * Set the news loading animation. 
734-  *   
732+  * 
735733 * @param  {boolean } val True to set loading animation, otherwise false. 
736734 */ 
737735function  setNewsLoading ( val ) { 
@@ -773,7 +771,7 @@ newsArticleContentScrollable.onscroll = (e) => {
773771
774772/** 
775773 * Reload the news without restarting. 
776-  *   
774+  * 
777775 * @returns  {Promise.<void> } A promise which resolves when the news 
778776 * content has finished loading and transitioning. 
779777 */ 
@@ -811,7 +809,7 @@ async function digestMessage(str) {
811809/** 
812810 * Initialize News UI. This will load the news and prepare 
813811 * the UI accordingly. 
814-  *   
812+  * 
815813 * @returns  {Promise.<void> } A promise which resolves when the news 
816814 * content has finished loading and transitioning. 
817815 */ 
@@ -890,7 +888,7 @@ async function initNews(){
890888        const  switchHandler  =  ( forward )  =>  { 
891889            let  cArt  =  parseInt ( newsContent . getAttribute ( 'article' ) ) 
892890            let  nxtArt  =  forward  ? ( cArt  >=  newsArr . length - 1  ? 0  : cArt  +  1 )  : ( cArt  <=  0  ? newsArr . length - 1  : cArt  -  1 ) 
893-      
891+ 
894892            displayArticle ( newsArr [ nxtArt ] ,  nxtArt + 1 ) 
895893        } 
896894
@@ -930,7 +928,7 @@ document.addEventListener('keydown', (e) => {
930928
931929/** 
932930 * Display a news article on the UI. 
933-  *   
931+  * 
934932 * @param  {Object } articleObject The article meta object. 
935933 * @param  {number } index The article index. 
936934 */ 
@@ -965,7 +963,7 @@ async function loadNews(){
965963    } 
966964
967965    const  promise  =  new  Promise ( ( resolve ,  reject )  =>  { 
968-          
966+ 
969967        const  newsFeed  =  distroData . rawDistribution . rss 
970968        const  newsHost  =  new  URL ( newsFeed ) . origin  +  '/' 
971969        $ . ajax ( { 
0 commit comments