Spyke

Posts

perchance·Perchance - Create a Random Text GeneratorbyDiana47

Auto-Update one specific output every x seconds?

Hi! I have some issues figuring out how to do this (like, at all), and I'd greatly appreciate being pointed in the right direction. :D

I'm working on a generator with multiple outputs. Now, I know how to update them on click separately, no big deal. What I want for this generator is one output that auto-updates every few seconds to display a different item from its list.

Let's say the list's name is "quote" and the output div's ID is "quotes". (Not linking the generator in question because it's too work-in-progress-y and full of placeholders)

(One day I'll be proficient enough in JavaScript to figure these things out by myself, I swear!)

Thank you so much in advance!

View original on lemmy.world
perchance·Perchance - Create a Random Text GeneratorbyDiana47

I need help with a Consumable List where second choice depends on first choice

Hi!

I need a consumable list where two items are picked, but only the first is a random selection, and the second item is not at random but always a specific item based on the random first item.

Say, if item one is "A", then item two always has to be "X", and if item one is "B", then item two always has to be "Y".

To complicate things: "X" and "Y" should not be eligible for the random first item, they can only be the second, non-random item.

To complicate things further: none of the items are numbers, I'm sorry.

What I tried was to do something like a consumable list with dynamic odds, where I used == instead of != in mad hopes it'd work, but of course it didn't. (Is this something that could work if I changed it up a bit?)

A friend suggested I could use key/value pairs, but that would be so incredibly unwieldy and I'd rather not. I want to use this for long lists (plural) and for multiple possible outcomes. If key/value pairs are the most reasonable way to do this, how would I do this? Could I define the pairs in my list?

I'd really, really appreciate if someone could point me in the right direction.

Sorry if my question and/or explanation is confusing, I had too much coffee and I've been staring at code >24 hours now. Please let me know if I need to rephrase my question to make it make sense to people who are not in my brain.

Thank you!

(Not linking the generator in question because it's almost 3,000 lines of code and what I want to do is currently not in it anyway lol.)

View original on lemmy.world
perchance·Perchance - Create a Random Text GeneratorbyDiana47

Generators won't load

I am so very sorry that I once again come here with an issue that someone else also reported having on the old Reddit community, haha.

https://www.reddit.com/r/perchance/comments/16g9sml/perchance_literally_just_refuses_to_open_now/

I have a very similar issue, and they might be related.

Perchance's homepage is loading for me, and when I go directly to my generators' edit page (#edit) this loads as well, but the generator doesn't. None of my generators do. The only thing that loads when trying to view a generator is the favicon. xD

The iframe embedded versions of the generators on their respective blogs aren't loading either.

It's not my internet connection. I've rebooted my router and my repeater. I've tried multiple browsers, private and logged mode, with and without a VPN, cleared my cache... basically the whole "have you tried switching it off and back on again" routine.

View original on lemmy.world

You reached the end