diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3a8f824 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/app.js", + "runtimeExecutable": "/home/ankur/.nvm/versions/node/v12.13.1/bin/node" + } + ] +} \ No newline at end of file diff --git a/app.js b/app.js index 4e9b901..ff03788 100644 --- a/app.js +++ b/app.js @@ -99,22 +99,24 @@ app.get('/', (req, res) => { var optimized_total = 0 lighthouseResult.categories.pwa.auditRefs.forEach(auditRef => { var audit = lighthouseResult.audits[auditRef.id] - if (auditRef.group === 'pwa-fast-reliable') { - fast_reliable_total++ - if ((audit) && (audit.score >= 0.9)) { - fast_reliable++ + if (audit.scoreDisplayMode === 'binary' || audit.scoreDisplayMode === 'numeric') { + if (auditRef.group === 'pwa-fast-reliable') { + fast_reliable_total++ + if ((audit) && (audit.score >= 0.9)) { + fast_reliable++ + } } - } - else if (auditRef.group === 'pwa-installable') { - installable_total++ - if ((audit) && (audit.score >= 0.9)) { - installable++ + else if (auditRef.group === 'pwa-installable') { + installable_total++ + if ((audit) && (audit.score >= 0.9)) { + installable++ + } } - } - else if (auditRef.group === 'pwa-optimized') { - optimized_total++ - if ((audit) && (audit.score >= 0.9)) { - optimized++ + else if (auditRef.group === 'pwa-optimized') { + optimized_total++ + if ((audit) && (audit.score >= 0.9)) { + optimized++ + } } } }) @@ -231,6 +233,12 @@ function proceed(performance, accessibility, best_practices, seo, pwa, res, cate .guage-invisible { display: none } + .lh-gauge--pwa__logo--primary-color { + fill: #304ffe + } + .lh-gauge--pwa__logo--secondary-color { + fill: #3d3d3d + } @@ -285,9 +293,9 @@ function proceed(performance, accessibility, best_practices, seo, pwa, res, cate