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.
20 lines
418 B
20 lines
418 B
|
|
var url = api_url + 'peerid'
|
|
|
|
elem = document.getElementsByTagName('div')[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');
|