File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
- // Connect to Substrate endpoint
1
+ // Some global variables used by this code.
2
2
let global = {
3
3
indices : { } ,
4
4
limit : 1000 ,
5
5
} ;
6
6
7
+ // Connect to Substrate endpoint
7
8
async function connect ( ) {
8
9
let endpoint = document . getElementById ( 'endpoint' ) . value ;
9
10
if ( ! window . substrate || global . endpoint != endpoint ) {
@@ -16,6 +17,7 @@ async function connect() {
16
17
}
17
18
}
18
19
20
+ // Batch query indices information from the chain
19
21
async function findIndices ( a , b ) {
20
22
document . getElementById ( 'output' ) . innerHTML = "Querying..." ;
21
23
let queries = [ ] ;
@@ -41,6 +43,7 @@ async function findIndices(a, b) {
41
43
}
42
44
}
43
45
46
+ // Create a table with the index information
44
47
function createTable ( ) {
45
48
document . getElementById ( 'output' ) . innerHTML = "Creating Table..." ;
46
49
@@ -84,6 +87,7 @@ function createTable() {
84
87
document . getElementById ( 'output' ) . innerHTML = "Done." ;
85
88
}
86
89
90
+ // Clear the table and all stored indices
87
91
function clearIndices ( ) {
88
92
global . indices = { } ;
89
93
let table = document . getElementById ( 'indices-table' ) ;
You can’t perform that action at this time.
0 commit comments