workflow_launcher/renderer.js

19 lines
566 B
JavaScript
Raw Normal View History

2024-03-11 11:01:07 -04:00
const workflowsList = document.getElementById('workflows')
fetch('./workflows.json')
.then((response) => response.json())
.then((workflowsJson) => {
workflowsJson.workflows.forEach((site) => {
let li = document.createElement("li")
let img = document.createElement('img')
let a = document.createElement('a')
img.src = site.logo
img.alt = site.name
a.href = site.script
a.appendChild(img)
li.appendChild(a)
li.appendChild(document.createTextNode(site.name))
workflowsList.appendChild(li)
})
});