Update
This commit is contained in:
parent
3d392c7fc7
commit
35e5f000f3
|
@ -0,0 +1,28 @@
|
|||
const log = document.getElementById('log');
|
||||
log.innerHTML = "";
|
||||
|
||||
async function fetchData() {
|
||||
|
||||
var serverAddress = "techhub.social";
|
||||
|
||||
const response = await fetch(`https://${serverAddress}/api/v1/accounts/111518136987654656/statuses`);
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
data.forEach(obj => {
|
||||
Object.entries(obj).forEach(([key, value]) => {
|
||||
|
||||
if (key == "id") {
|
||||
log.innerHTML = log.innerHTML + `<iframe src="https://techhub.social/@Melawy/${value}/embed" class="mastodon-embed" style="max-width: 100%; border: 0" height="100%" width="60%" allowfullscreen="allowfullscreen"></iframe>` + '<br>';
|
||||
}
|
||||
|
||||
});
|
||||
log.innerHTML = log.innerHTML + '<br>';
|
||||
});
|
||||
}
|
||||
|
||||
function openInNewTab(url) {
|
||||
window.open(url, '_blank').focus();
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", fetchData);
|
|
@ -275,7 +275,9 @@
|
|||
|
||||
<script src="node_modules/@fortawesome/fontawesome-free/js/all.min.js"></script>
|
||||
|
||||
<script src="assets/js/script.js"></script>
|
||||
<script src="https://techhub.social/embed.js" async="async"></script>
|
||||
|
||||
<script type="module" src="assets/js/script.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
|
|
@ -173,6 +173,9 @@
|
|||
</ul>
|
||||
</article>
|
||||
|
||||
<div id="log"></div>
|
||||
<script type="module" src="assets/js/toot.js"></script>
|
||||
|
||||
<!--
|
||||
<nav class="blog-pagination" aria-label="Pagination">
|
||||
<a class="btn btn-outline-primary rounded-pill" href="#">Older</a>
|
||||
|
|
Loading…
Reference in New Issue