mirror of
https://codeberg.org/Hyperpipe/pages
synced 2024-12-06 19:16:42 +01:00
Added Privacy Policy
This commit is contained in:
+17
-5
@@ -15,6 +15,10 @@
|
||||
h1 {
|
||||
padding: 2rem;
|
||||
}
|
||||
td {
|
||||
max-width: 50vw;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
h1, td {
|
||||
text-align: center;
|
||||
}
|
||||
@@ -49,6 +53,7 @@
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>URL</th>
|
||||
<th>Privacy Policy</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user