this post was submitted on 16 Jul 2024
3 points (100.0% liked)

Perchance - Create a Random Text Generator

448 readers
19 users here now

⚄︎ Perchance

This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.

Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)

This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.

See this post for the Complete Guide to Posting Here on the Community!

Rules

1. Please follow the Lemmy.World instance rules.

2. Be kind and friendly.

  • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)

3. Be thankful to those who try to help you.

  • If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)

4. Only post about stuff related to perchance.

  • Please only post about perchance related stuff like generators on it, bugs, and the site.

5. Refrain from requesting Prompts for the AI Tools.

  • We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"
  • See Perchance AI FAQ for FAQ about the AI tools.
  • You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
  • We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

6. Search through the Community Before Posting.

  • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

founded 1 year ago
MODERATORS
 

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.

top 4 comments
sorted by: hot top controversial new old
[–] perchance 1 points 4 months ago (1 children)

Thanks! This has annoyed me at times too - I should have fixed it ages ago. Should be fixed now.

[–] wthit56 1 points 4 months ago (1 children)

Hey it works! What was the problem by the way? I've been in web dev for a while, and I know it happens on some sites but never had it happen on my own (that I noticed anyway). Is it something like transparent text, or text off the screen or something?

[–] perchance 1 points 4 months ago (1 children)

Yeah there's some code that basically pulls the "rendered" HTML out of the iframe and sanitizes it, and adds it as offscreen text so crawlers can index it as if it weren't embedded in an iframe. It's not really necessary if a generator has good $meta.description, but it probably helps a bit anyway. That text should have had display:none (which should still be indexed, since crawlers need to allow for the possibility of it being interactively shown some time after page load). Ideally crawlers would just notice that the iframe takes up the whole page, and "look into" it for content to index, but at least with Google's it either doesn't do that, or only sometimes does that (i.e. for popular pages where it can spend more resources) - at least, last time I checked

[–] wthit56 1 points 4 months ago

Ah I see--thanks for explaining 👍