diff --git a/index.html b/index.html index ea1ee9f..4d257fd 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,10 @@ h1 { padding: 2rem; } + td { + max-width: 50vw; + overflow-wrap: break-word; + } h1, td { text-align: center; } @@ -49,6 +53,7 @@ Name URL + Privacy Policy @@ -58,7 +63,7 @@ try { const tbody = document.getElementById('table').getElementsByTagName('tbody')[0]; - document.getElementById('to').innerText = location.hash.replace('#','') + document.getElementById('to').textContent = location.hash.replace('#','') fetch('https://raw.codeberg.page/Hyperpipe/pages/api/frontend.json').then(res => { res.json().then(json => { @@ -66,18 +71,25 @@ const row = document.createElement('tr'), name = document.createElement('td'), url = document.createElement('td'), - a = document.createElement('a'), + privacy = document.createElement('td'), + link = document.createElement('a'), + policy = document.createElement('a'), nameNode = document.createTextNode(i.name), urlNode = document.createTextNode(i.url); - a.href = i.url + location.hash.replace('#', ''); - a.appendChild(urlNode); + link.href = i.url + location.hash.replace('#', ''); + link.appendChild(urlNode); + + policy.href = i.privacy; + policy.textContent = 'Visit' name.append(nameNode); - url.append(a); + url.append(link); + privacy.append(policy) row.append(name); row.append(url); + row.append(privacy) tbody.append(row); }