adding links to page

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-01-06 20:25:00 +01:00
parent 49a4161b28
commit 1e46a9d333
4 changed files with 95 additions and 8 deletions

9
sj.js
View File

@@ -27,6 +27,15 @@ async function handleData(response){
}
}
}
if (event.start){
var span = create('span');
span.setAttribute('class','start');
var loc = event.location;
var pos = loc.indexOf(',');
if (pos>0) loc = loc.substring(0,pos);
span.innerHTML = event.start + ' @ '+ loc + '<br/>';
div.prepend(span);
}
var h4 = create('h4');
h4.innerHTML = event.url ? `<a href="${event.url}" target="_blank">${event.title}</a>` : event.title;
div.prepend(h4);