Skip to content

Commit 21c94d8

Browse files
ibelemanssiko
authored andcommitted
fix spec_total and fetch url issue
1 parent 5d336ec commit 21c94d8

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

webnn-status.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,13 @@ sup {
474474
const init = () => {
475475
let ops = document.querySelector('#ops');
476476
let opsFramework = document.querySelector('#ops_framework');
477-
fetch("https://webmachinelearning.github.io/assets/json/webnn_status.json")
477+
478+
let jsonPath = "../assets/json/webnn_status.json";
479+
if(location.hostname.toLowerCase('webmachinelearning.github.io') >-1)
480+
{
481+
jsonPath = "https://webmachinelearning.github.io/assets/json/webnn_status.json";
482+
}
483+
fetch(jsonPath)
478484
.then(response => response.json())
479485
.then(data => {
480486
let impl_status = data.impl_status;
@@ -757,7 +763,7 @@ sup {
757763

758764
oplistFramework = oplistFramework + `
759765
<tr>
760-
<th id="spec_total"></th>
766+
<th id="spec2_total"></th>
761767
<th id="ed_total" colspan="2"></th>
762768
<th id="ep_total" colspan="2"></th>
763769
</tr>
@@ -772,9 +778,9 @@ sup {
772778
const count = () => {
773779
let spec_defined_total = 78;
774780

775-
let spec_s = qSA('.spec').length;
776-
let spec_percentage = (spec_s / spec_defined_total * 100).toFixed(1) ;
777-
qS('#spec_total').innerHTML = `${spec_s} / ${spec_defined_total}, ${spec_percentage}%`;
781+
let spec_s = qSA('.spec').length / 2;
782+
qS('#spec_total').innerHTML = `${spec_s}`;
783+
qS('#spec2_total').innerHTML = `${spec_s}`;
778784

779785
let wpt_s = qSA('.wpt_s').length;
780786
let wpt_percentage = (wpt_s / spec_defined_total * 100).toFixed(1) ;

0 commit comments

Comments
 (0)