function load_random_site() { console.log("requested random site"); const webring_all_url = "https://aidang.cc/webring/all"; fetch(webring_all_url) .then((response) => response.json()) .then((obj) => { const entries = obj; console.log(entries); const entry = entries[Math.floor(Math.random() * entries.length)]; console.log(entry); }); } function load_webring() { const webring_url = "https://aidang.cc/webring/https://jjanzen.ca"; const webring_container = document.getElementById("cssa-webring-container"); fetch(webring_url) .then((response) => response.json()) .then((obj) => { const webring_html = `
"Official" CSSA Webring
`; webring_container.innerHTML = webring_html; }); } document.addEventListener("DOMContentLoaded", load_webring, false);