diff options
-rw-r--r-- | scripts/cssa-webring.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/cssa-webring.js b/scripts/cssa-webring.js index f385d34..d4aa430 100644 --- a/scripts/cssa-webring.js +++ b/scripts/cssa-webring.js @@ -6,8 +6,11 @@ function load_random_site() { fetch(webring_all_url) .then((response) => response.json()) .then((obj) => { - const urls = obj; - console.log(urls); + const entries = obj; + console.log(entries); + + const entry = entries[Math.floor(Math.random() * entries.length)]; + console.log(entry); }); } |