Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Jul 26, 2024
1 parent 9f386de commit bece09a
Showing 1 changed file with 0 additions and 80 deletions.
80 changes: 0 additions & 80 deletions templates/index.js
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
// // console.log("status.js loaded");

// function randomId() {
// return (Math.round(Math.random()*1e8)).toString(16);
// }

// // Log to an element by its id
// function logToId(id, ...args) {
// let el = document.getElementById(id);
// if (!el) {
// el = document.createElement('code');
// el.id = id;
// document.body.appendChild(el);
// }

// el.innerHTML = args.map((arg) => {
// return typeof arg === 'object' ? stringify(arg) : arg;
// }).join(' ') + "<br>";
// }

// // Clear the content of an element by its id
// function clearId(id) {
// if (id) {
// let el = document.getElementById(id);
// if (el) {
// el.innerHTML = '';
// }
// }
// }

// function log(...args) {
// let el = document.createElement('code');
// el.innerHTML = args.map((arg) => {
// return typeof arg === 'object' ? stringify(arg) : arg;
// }).join(' ') + "<br>";
// document.body.appendChild(el);
// }


// function stringify(json) {
// if (typeof json != 'string') {
// json = JSON.stringify(json, (k, v) => { return typeof v === "bigint" ? v.toString() + 'n' : v; }, 2);
// }
// json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"(\d+)n"/g,"$1n");
// return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?n?)/g, function (match) {
// var cls = 'number';
// if (/^"/.test(match)) {
// if (/:$/.test(match)) {
// cls = 'key';
// } else {
// cls = 'string';
// }
// } else if (/true|false/.test(match)) {
// cls = 'boolean';
// } else if (/null/.test(match)) {
// cls = 'null';
// }
// return '<span class="' + cls + '">' + match + '</span>';
// });
// }


document.addEventListener('DOMContentLoaded', () => {
table = document.createElement('table');
document.body.appendChild(table);
Expand Down Expand Up @@ -167,21 +105,3 @@ function sort() {
tbody.innerHTML = ''; // Clear existing rows
rows.forEach(row => tbody.appendChild(row));
}

/*
{
"version": "v0.14.1-2eb1dfd3",
"sid": "070904073564caa7",
"uid": "ec5c21895e451a39",
"url": "wss://ruby.kaspa.stream/kaspa/mainnet/wrpc/borsh",
"protocol": "wrpc",
"encoding": "borsh",
"encryption": "tls",
"network": "mainnet",
"cores": 18,
"status": "delegator",
"connections": 145,
"capacity": 18432,
"delegates": ["[070904073564caa7] wss://lily.kaspa.stream/kaspa/mainnet/wrpc/borsh"]
}
*/

0 comments on commit bece09a

Please sign in to comment.