wthit56

joined 4 months ago
[โ€“] wthit56 2 points 2 months ago

Yeah, looks like what you did by commenting that out of the prompt is about right. ๐Ÿ‘

[โ€“] wthit56 1 points 2 months ago

Awesome ๐Ÿ‘

[โ€“] wthit56 1 points 2 months ago (2 children)

Ah, you're actually putting it in a different place that I thought you were. Also, the values of the dropdowns don't work the way I thought they did ๐Ÿ˜‚

It seems perhaps [input.Rtype] is what you're meant to use with that system to get the current prompt from that. (It's a bit complicated honestly--I use my own plugin so I'm not experienced with t2i... ๐Ÿ˜…)

What exactly were you trying to do? If it's just to include the value in the other part of the prompt, the above should work (I guess). But you did that before right--what happens if you do that?

[โ€“] wthit56 1 points 2 months ago (5 children)

Are you logging in when you open it in incognito mode?

What do you mean "kicks me out"?

[โ€“] wthit56 1 points 2 months ago

Yeah that's fair enough ;p

[โ€“] wthit56 1 points 2 months ago

@[email protected] Man, I wish the screenshots worked. "Here's my completely empty tutorial page ๐Ÿ‘๐Ÿ‘๐Ÿค“"

๐Ÿ˜‚

[โ€“] wthit56 1 points 2 months ago (2 children)

Ah I see... I only used hash because that's what the address changes to when you click a tab. You can now use history.replaceState() to change the params in the address bar, if you want to change things to use that instead, maybe?

[โ€“] wthit56 1 points 2 months ago (4 children)

@[email protected] I understand you maintain the hub?

[โ€“] wthit56 1 points 2 months ago

Cool, thanks ๐Ÿ‘

[โ€“] wthit56 1 points 2 months ago (3 children)

Okay, so you don't need to put the code into the HTML as well; you can remove that.

The error box tells you there's an error with [output]. Which you don't need at all, so you can remove that from the HTML panel and that error will go away.

The wheelOptions object in the perchance panel ends immediately (with no items or properties or settings)... because the next line lineWidth=10 is not indented. So it just starts its own new list called lineWidth=10. That's not what you want.

Indent it, and now that is a property of wheelOptions, and the rest of the items below it will be as well. So when wheelOptions is sent into that makeWheel() function it will use those settings to build the wheel.

[โ€“] wthit56 1 points 2 months ago* (last edited 2 months ago) (4 children)

What does that even do? I've never seen code like that in perchance documentation or anywhere else. Does that actually do anything?

Got a link to a generator that uses this code? It might stop the error but not actually do anything; if [input.Lighting] != "": would just be an item within the Line-Art style list. ๐Ÿคท

If you could give me a link to the code I gave not working, I could look at the error and figure it out for you.

 

I'm not sure if this is a bug or what, but there's something unexpected going on.

I've set up a test for you to see here: https://perchance.org/sxvghvl53i#edit

I've got an $output that creates HTML, which contains the code [a.html], but escaped so that it's not processed. So: \[a.html\].

This is then injected into the page, and actually processed correctly, replacing the contents with the a.html value. But then calling update() on that element either does nothing or throws an error of one kind or another.

It says that a_elem is undefined, when it should have already been injected into the page.

Honestly, I've been fiddling with this test for a while now and I can't quite pin down exactly how it works or what this works and that doesn't or what order things are being processed in... But some sort of shenanigans is going on.

If this is all working as expected, I'd love to learn how it works. But if not, consider this a bug report ๐Ÿ˜…

 

I prefer to leave "auto" off while coding, as I do a lot of stuff before I want anything to run, want to avoid running half-written code and getting errors, etc. But then I have to go and click on the "reload" button all the time to test.

Saving reloads the app too, but I don't really want to save all those versions just when testing. It would be great to have a shortcut to reload. Perhaps CTRL+R can be overriden? Or some other shortcut--it's all good.

2
submitted 4 months ago by wthit56 to c/perchance
 

It would be so useful to be able to search the current gallery by text--including the title, prompt (and whatever else there might be). That's about all I have to say about that I guess ๐Ÿ˜…

3
submitted 4 months ago by wthit56 to c/perchance
 

There's some very strange behaviour that happens when you use CTRL+F to search for text on a page.

For example:

The first "image" text on the page is in the "images & sprites" heading. But before that, it finds 4 instances of "image" which... seemingly don't exist? Are hidden or something? Looking at the code of that generator I have no idea. Only then does it find any of the real instances of "image" that are on the page--three of them.

This problem happens all over the site on all sorts of generators by the way, it's not unique to that one. It's just an easy example.

For me personally this has been troublesome when trying to search on a documentation page for some particular function name--things like that. Or when there's a very complex generator with a ton of buttons I want to find one that does the thing I want to do--but instead I have to read through every one of them, because the page search doesn't work correctly.

By the way I'm using Chrome 126.0.6478.132 (Official Build) (64-bit). I haven't tested on other browsers, but as a lot of the big browsers are Chromium-based I'm guess at least those will have the issue.

 

We can put CSS in our generators that works with the user's dark mode setting on their device. But it would be great if that was built-in to the default styles. Doesn't have to be anything fancy, this would do for a start:

@media (prefers-color-scheme: dark) {
  body {
    background-color: #000;
    color: #aaa;
  }
}

It seems some of the templates may override such styles and make the body white and such anyway. So maybe that's something to look into as well.

1
submitted 4 months ago* (last edited 3 months ago) by wthit56 to c/perchance
 

If you set it to allow permanently, there is no way for the user to turn the block on again without fiddling with code. Even if they set it to an hour or whatever, they may want to turn it on again early, which they also cannot do.

I was thinking maybe if it detects it was an nsfw image, it shows an extra button which lets you block nsfw images.

I talked about this on Reddit, and found a solution with some help.

I made the following (somewhat) easier solution that less technical people can use. It uses a bookmarklet.

Make a bookmark, call it what you want. Set its address to: javascript:url="https://image-generation.perchance.org/embed"; if (location.href!==url) { alert("Opening to correct page. Run this again."); open(url); } else { localStorage.okayToShowNsfwUntil="0"; alert("NSFW setting reset."); }

(I would put a link you can drag into your bookmarks, but this forum doesn't recognise "javascript:" addresses.)

Note that this will run JS code in your current page. though you can see what it's doing if you're worried about that and decide if you want to use it or not.

With the code formatted more clearly:

url="https://image-generation.perchance.org/embed";
if (location.href !== url) {
  alert("Opening correct page. Run this again.");
  open(url);
}
else {
  localStorage.okayToShowNsfwUntil="0";
  alert("NSFW setting reset.");
}

If you're not in the right place it opens a window to image-generation. And if you are in the right place, it resets the okayToShowNsfwUntil flag for you.

I hope this helps people in the meantime. But it would be great if there was something built-in to image-generation so people don't have to find this page and make the bookmarklet and all that.

2
Can't sign up (self.perchance)
submitted 4 months ago by wthit56 to c/perchance
 

Tried to sign up many times. I get sent a verification code (sometimes). Paste/type it in and it always says it's incorrect. So frustrating, as I'd like to create some generators (and have them actually save).

Can anyone help me? Or point me to how to contact the right people about this?

view more: โ€น prev next โ€บ