aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/cssa-webring.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/cssa-webring.js b/scripts/cssa-webring.js
index eb59c08..8f0a0c4 100644
--- a/scripts/cssa-webring.js
+++ b/scripts/cssa-webring.js
@@ -1,18 +1,19 @@
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 entries = obj; // TODO: remove myself from the list
+ const entries_cleaned = obj.filter((item) => {
+ return !item.equals({
+ name: "jjanzen's website",
+ url: "https://jjanzen.ca",
+ });
+ });
+ console.log(entries_cleaned);
const entry = entries[Math.floor(Math.random() * entries.length)];
- console.log(entry);
-
- window.location.href = entry.url;
+ // window.location.href = entry.url;
});
}