Skip to content

Commit a4bfc04

Browse files
committed
Generate audit options in extension from configJSON
1 parent 1b1cbdf commit a4bfc04

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

lighthouse-extension/app/popup.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,9 @@ <h2 class="header-titles__url">...</h2>
5252
<aside class="options subpage">
5353
<h2 class="options__title">Options</h2>
5454
<ul class="options__list">
55-
<li><label><input type="checkbox" checked="checked" value="App can load on offline/flaky connections" />App can load on offline/flaky connections</label></li>
56-
<li><label><input type="checkbox" checked="checked" value="Page load performance is fast" />Page load performance</label></li>
57-
<li><label><input type="checkbox" checked="checked" value="Site is progressively enhanced" />Site is progressively enhanced</label></li>
58-
<li><label><input type="checkbox" checked="checked" value="Network connection is secure" />Network connection is secure</label></li>
59-
<li><label><input type="checkbox" checked="checked" value="User can be prompted to Add to Homescreen" />User can be prompted to Add to Homescreen</label></li>
60-
<li><label><input type="checkbox" checked="checked" value="Installed web app will launch with custom splash screen" />Installed web app will launch with custom splash screen</label></li>
61-
<li><label><input type="checkbox" checked="checked" value="Address bar matches brand colors" />Address bar matches brand colors</label></li>
62-
<li><label><input type="checkbox" checked="checked" value="Design is mobile-friendly" />Design is mobile-friendly</label></li>
63-
<li><label>&nbsp;</li>
64-
<li><label><input type="checkbox" checked="checked" value="Best Practices" /><label for="bestpractices">Best Practices</label></li>
65-
<li><label><input type="checkbox" checked="checked" value="Performance Metrics" /><label for="performance">Performance Metrics</label></li>
6655
</ul>
6756

68-
<button class="button button--link button--go-back" id="go-back">Back</button>
57+
<button class="button button--link button--ok" id="ok">OK</button>
6958
</aside>
7059

7160
<script src="scripts/popup.js"></script>

lighthouse-extension/app/src/popup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ document.addEventListener('DOMContentLoaded', _ => {
4646
const generateOptionsEl = document.getElementById('configure-options');
4747
const optionsEl = document.body.querySelector('.options');
4848
const optionsList = document.body.querySelector('.options__list');
49-
const goBack = document.getElementById('go-back');
49+
const okButton = document.getElementById('ok');
5050

5151
let spinnerAnimation;
5252

@@ -138,7 +138,7 @@ document.addEventListener('DOMContentLoaded', _ => {
138138
optionsEl.classList.add(subpageVisibleClass);
139139
});
140140

141-
goBack.addEventListener('click', () => {
141+
okButton.addEventListener('click', () => {
142142
optionsEl.classList.remove(subpageVisibleClass);
143143
});
144144

lighthouse-extension/app/styles/lighthouse.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ body {
149149
text-decoration: underline;
150150
}
151151

152-
.button--go-back {
152+
.button--ok {
153153
align-self: center;
154154
}
155155

0 commit comments

Comments
 (0)