2023-11-26 06:39:30 +00:00
|
|
|
const data_get = document.getElementById("data_get");
|
|
|
|
fetch("https://blog.abtmtr.link/api/collections/paste/posts/domain")
|
|
|
|
.then((x) => x.json())
|
|
|
|
.then((paste) => {
|
|
|
|
const data = JSON.parse(paste.data.body);
|
|
|
|
data_get.innerHTML = data.reduce(
|
|
|
|
(html, subdomain) =>
|
|
|
|
html +
|
2023-11-26 06:55:00 +00:00
|
|
|
`<h1><a href="${subdomain.url}" target="_blank">${
|
|
|
|
subdomain.name
|
|
|
|
}</a></h1>
|
2023-11-26 06:39:30 +00:00
|
|
|
${subdomain.description.reduce(
|
|
|
|
(html, descfragment) => html + `<p>${descfragment}</p>`,
|
|
|
|
""
|
2023-11-26 06:55:00 +00:00
|
|
|
)}`,
|
2023-11-26 06:39:30 +00:00
|
|
|
""
|
|
|
|
);
|
|
|
|
});
|