fixes #37
This commit is contained in:
parent
31c12610f2
commit
aa31d04c32
5 changed files with 44 additions and 10 deletions
|
@ -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>
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue