forked from rocicorp/replicache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
29 lines (28 loc) · 923 Bytes
/
Copy pathindex.html
File metadata and controls
29 lines (28 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<script src="./perf.js" type="module"></script>
<script>
const selected = window.location.search
.substr(1)
.split('&')
.map(kv => kv.split('='))
.filter(([k]) => k == 'group')
.map(([, v]) => v);
window.onload = () => {
const form = document.querySelector('#group-form');
[...new Set(benchmarks.map(b => b.group))].forEach(group => {
var label = document.createElement('label');
var input = document.createElement('input');
input.type = 'checkbox';
input.name = 'group';
input.value = group;
input.checked = selected.indexOf(group) > -1;
input.onchange = () => form.submit();
label.appendChild(input);
label.appendChild(document.createTextNode(group));
form.appendChild(label);
});
};
</script>
<form id="group-form" method="GET"></form>
<button onclick="runAll(selected);">Go</button>
<pre id="out"></pre>