Skip to content

Commit bc1cd64

Browse files
committed
Update indices.js
1 parent ca6e759 commit bc1cd64

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

indices/indices.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
// Connect to Substrate endpoint
1+
// Some global variables used by this code.
22
let global = {
33
indices: {},
44
limit: 1000,
55
};
66

7+
// Connect to Substrate endpoint
78
async function connect() {
89
let endpoint = document.getElementById('endpoint').value;
910
if (!window.substrate || global.endpoint != endpoint) {
@@ -16,6 +17,7 @@ async function connect() {
1617
}
1718
}
1819

20+
// Batch query indices information from the chain
1921
async function findIndices(a, b) {
2022
document.getElementById('output').innerHTML = "Querying...";
2123
let queries = [];
@@ -41,6 +43,7 @@ async function findIndices(a, b) {
4143
}
4244
}
4345

46+
// Create a table with the index information
4447
function createTable() {
4548
document.getElementById('output').innerHTML = "Creating Table...";
4649

@@ -84,6 +87,7 @@ function createTable() {
8487
document.getElementById('output').innerHTML = "Done.";
8588
}
8689

90+
// Clear the table and all stored indices
8791
function clearIndices() {
8892
global.indices = {};
8993
let table = document.getElementById('indices-table');

0 commit comments

Comments
 (0)