You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
482 B
22 lines
482 B
|
|
var url = api_url + 'getblock'
|
|
|
|
var elem = document.getElementsByTagName('div')[0];
|
|
let button = document.getElementsByTagName('button')[0];
|
|
|
|
|
|
|
|
let promised_peerid = fetch(url).
|
|
then(resp => resp.json()).
|
|
then(obj => {
|
|
console.log('peerid.obj:',obj);
|
|
let buf = elem.innerHTML;
|
|
buf = buf.replace(':peerid',obj.peerid);
|
|
buf = buf.replace(':name',obj.name);
|
|
elem.innerHTML = buf;
|
|
return obj
|
|
}).
|
|
catch(console.error);
|
|
|
|
|
|
console.log('peerid.js loaded');
|