This commit is contained in:
Ray Lothian 2019-03-14 15:20:52 +01:00
parent 31c12610f2
commit aa31d04c32
5 changed files with 44 additions and 10 deletions

View file

@ -19,7 +19,7 @@
<th colspan="3">
<select id="browser">
<optgroup label="Populars">
<option value="Internet Explorer">Internet Explorer</option>
<option value="IE">Internet Explorer</option>
<option value="Safari">Safari</option>
<option value="Chrome">Chrome</option>
<option value="Firefox">Firefox</option>

View file

@ -43,7 +43,10 @@ function update() {
tbody.textContent = '';
parent.dataset.loading = true;
fetch('browsers/' + browser + '-' + os.replace(/\//g, '-') + '.json').then(r => r.json()).catch(() => []).then(list => {
fetch('browsers/' + browser + '-' + os.replace(/\//g, '-') + '.json').then(r => r.json()).catch(e => {
console.error(e);
return [];
}).then(list => {
if (list) {
const fragment = document.createDocumentFragment();
for (const o of sort(list)) {