From 848440ed1c69df845f1997d24756be7e3a1063a9 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Thu, 10 May 2018 04:36:52 -0400 Subject: [PATCH] Fixed an issue with registry scan, minor UI changes. The registry scan function exited early if no Java Development Key was found. This has been corrected by redoing the exit checks. Social media buttons now lose focus after they are clicked to prevent a sticky appearance. Changed the load spinner to have the text rotate within the center image. --- app/assets/css/launcher.css | 3 +- app/assets/js/assetguard.js | 57 ++++++++++++++++++++++++--------- app/assets/js/scripts/uicore.js | 7 ++++ 3 files changed, 51 insertions(+), 16 deletions(-) diff --git a/app/assets/css/launcher.css b/app/assets/css/launcher.css index 2020fef..13882ab 100644 --- a/app/assets/css/launcher.css +++ b/app/assets/css/launcher.css @@ -2122,7 +2122,7 @@ p { /* Stationary image for the spinner. */ #loadCenterImage { position: absolute; - width: 200px; + width: 277px; height: auto; } @@ -2130,6 +2130,7 @@ p { #loadSpinnerImage { width: 280px; height: auto; + z-index: 400; } /* Rotating animation for the spinner. */ diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index 4238c4c..9fc73ab 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -854,15 +854,14 @@ class AssetGuard extends EventEmitter { // 'SOFTWARE\\JavaSoft\\JDK' // Forge does not yet support Java 9, therefore we do not. - let cbTracker = 0 - let cbAcc = 0 - // Keys for Java 1.8 and prior: const regKeys = [ '\\SOFTWARE\\JavaSoft\\Java Runtime Environment', '\\SOFTWARE\\JavaSoft\\Java Development Kit' ] + let keysDone = 0 + const candidates = new Set() for(let i=0; i { if(err){ + keysDone++ console.error(err) - if(i === regKeys.length-1 && cbAcc === cbTracker){ + + // REG KEY DONE + // DUE TO ERROR + if(keysDone === regKeys.length){ resolve(candidates) } } else { - cbTracker += javaVers.length - if(i === regKeys.length-1 && cbTracker === cbAcc){ - resolve(candidates) + if(javaVers.length === 0){ + // REG KEY DONE + // NO SUBKEYS + keysDone++ + if(keysDone === regKeys.length){ + resolve(candidates) + } } else { + + let numDone = 0 + for(let j=0; j { + val.addEventListener('click', e => { + document.activeElement.blur() + }) + }) + } else if(document.readyState === 'complete'){ //266.01