kalloway: Lit patio lanterns (Patio Lanterns)
Kalloway ([personal profile] kalloway) wrote in [community profile] smallweb2024-11-27 10:38 pm
Entry tags:

Smallweb Chatter Post

Hi [community profile] smallweb! Let's chat!

Chatter posts are irregularly-occurring posts to... chat in. Show off what you're working on, what cool stuff you've found lately, what's going well or not so well or anything else. Stop in to say Hi if you want.
matsushima: something something nostalgia something (paint me)

[personal profile] matsushima 2024-11-28 05:56 am (UTC)(link)
I've been steadily tinkering away on my website. I think the thing I'm most proud of is the alternate navigation/text based game, Matsushima Manor - but if anyone knows how to use the same "random link" JavaScript (e.g., the script on a this page) multiple times on the same page, I'd love to know.

My current project is a page documenting my paracosm. The coding is complete so now it's just writing down years of lore.
Edited (typos) 2024-11-28 05:57 (UTC)
toothpastepancake: (Default)

[personal profile] toothpastepancake 2024-11-28 07:35 am (UTC)(link)
Finally got my webrings updated after a month of absence due to Life. It's not much but something!
aleteoryx: kasane teto, in a suit and santa hat, singing in the snow (Default)

[personal profile] aleteoryx 2024-11-28 04:57 pm (UTC)(link)

"if anyone knows how to use the same "random link" JavaScript multiple times on the same page"

assuming you mean different sets of links for each, you could do something like

<script>
  var sites_a = [
    "/url/of/option/one",
    "/url/of/option/two"
  ];

  var sites_b = [
    "/url/of/different/option/one",
    "/url/of/different/option/two"
  ];

  function randomSite(sites) {
    var i = parseInt(Math.random() * sites.length);
    location.href = sites[i];
  }
</script>

<a href="#" onclick="randomSite(sites_a);">Click me to go to a random site in set A</a><br>
<a href="#" onclick="randomSite(sites_b);">Click me to go to a random site in set B</a>

you can add as many arrays as you want, as long as you pass the right one to randomSite in the onclick handler

Edited 2024-11-28 17:11 (UTC)
stepnix: Purple shepherd's crook (pastoral)

[personal profile] stepnix 2024-11-28 08:56 pm (UTC)(link)
Not much in terms of site updates, but i am playing through one of the games I'm recommending on it! So, call it a research phase