VioneT

joined 1 year ago
MODERATOR OF
[–] VioneT 2 points 3 months ago

After Heat, why not Cold? Xd

Or Textiles and Patterns.

[–] VioneT 1 points 3 months ago (1 children)

It is an error in which you are referencing something that doesn't exist.

I recommend re-remixing the page you want to remix. If you click 'edit', the HTML editor on the bottom right doesn't seem to match the HTML of the original generator, which is why it is throwing an error that it cannot find the thing that it is supposed to output, the title.

[–] VioneT 1 points 3 months ago* (last edited 3 months ago) (2 children)

Cause it's uneven xd, also flows better on mobile.

[–] VioneT 1 points 3 months ago (1 children)

I've also made some tutorials/articles on some parts of Perchance. They are available on the Learn Tab of the /hub.

I think the most useful and less wordy that I made is: Perchance Snippets.

[–] VioneT 1 points 3 months ago (1 children)

Not sure how you have your list (or if you are using a list with dynamic odds) but here is an example to filter options with 0 odds:

random = {0-3}

output
  Selected: [x = random.selectOne] | Output: ~[verb]~ // the ~ are just here to show that it returns a blank string
	
verb
  $output = [this.selectAll.filter(a => a.getOdds)] // returns a blank string if there isn't any option with odds.
  pat^[x == '1']
  befriend^[x == '2']
  help^[x == '3']
[–] VioneT 2 points 3 months ago

If you have the auto ticked. Yes, the page isn't totally refreshed, like a page reload, it just updates it i.e. gets the changes from the editors, then re-runs the Perchance code.

I'm not fully sure how it works. So, pinging Dev for some clarification.

When you check the document.head (via console.log or just normal inspect) where you append the styles when on auto, you can see the styles that were added. Since the other <styles> still have the background-color even if it has been removed from the code, it would still apply its styles.

When you click the refresh button next to the auto checkbox, then, the page is fully refreshed. Meaning, it would reset all changes on the dom, then apply the new changes from the code.

[–] VioneT 2 points 3 months ago

Here is the prompting guide that I wrote. It is also linked on the Community Description:

...
Also where to post Community Events. Also here’s a quick link to a wealth of prompt info
...

[–] VioneT 1 points 3 months ago (1 children)

Here is what I'm actually suggesting. https://perchance.org/roabyow92m

You have separated the tooltip from being locked. Instead, you have an instance of a tooltip that is outside of the locker. Then, you have the locked store the locked value in a variable. Then use that variable to toggle what tooltip is to be shown on the tooltip instance.
OR
You only have one list, then have the tooltip text as a property of the item that you select (so that the value is specific to that item).
OR
You have a 'template' tooltip text, then only change the part in which would say the stored value.

Since I don't know how you've coded your lists, I can only blindly suggest how you could rewrite them. But I've added there some examples of how you could re-write it.

[–] VioneT 2 points 3 months ago (1 children)

Can confirm that the changes are reflected immediately, Thanks!

[–] VioneT 1 points 3 months ago (3 children)

One thing you might be able to do is have a variable that is locked. Then use that variable to determine the tooltip to be used, separating the value from the tooltip entirely, so you can fix the value, then determine the tooltip needed based on that value.

[–] VioneT 2 points 3 months ago (3 children)
[–] VioneT 2 points 3 months ago (5 children)

Ah, I see it now. I never really used it like that.

You can, however, use &lt; as the < for the HTML, to essentially escape it from being understood as HTML directly like so:

[spoiler(`&lt;h1>A Spoiler Function&lt;/h1>
&lt;img style\="aspect-ratio: 768/512; height: 200px;" src\="https://user-uploads.perchance.org/file/c3e7005097f3fdad94bb003c300e6865.webp">
&lt;p>Lorem Ipsum&lt;/p>
&lt;button onclick\="event.stopPropagation(), update(minimalOut)">randomize&lt;/button>`)]

And you would be able to use it as an HTML. I've updated the demo generator to showcase it.

view more: β€Ή prev next β€Ί