abtmtr-v4/views/links/scripts/data_get_links.js

13 lines
372 B
JavaScript
Raw Normal View History

2023-11-26 06:55:00 +00:00
const data_get = document.getElementById("data_get");
2024-02-13 03:02:26 +00:00
fetch_ask("https://pronouns.cc/api/v1/users/clhd8desmggedm3q1t3g")
2023-11-26 06:55:00 +00:00
.then((x) => x.json())
.then((user) => {
data_get.innerHTML = user.links.reduce(
(html, link) =>
html +
`<h1><a href="${link}" target="_blank">${new URL(link).host}</a></h1>
<p>${link}</p>`,
""
);
});