Perchance - Create a Random Text Generator
⚄︎ 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.
- The full rules are posted here: (https://legal.lemmy.world/)
- User Rules: (https://legal.lemmy.world/fair-use/)
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
andai-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.
view the rest of the comments
Local storage is origin specific, meaning the local storage in
/ai-text-to-image-generator
is different from/ai-character-chat
and there isn't a way to pass data from one local storage to another. There are ways to pass data, but it involves using iframes and post messages.These two pages share the same origin and can both access the origin specific local storage.
To see this, open https://perchance.org/ai-text-to-image-generator and https://perchance.org/ai-character-chat in two tabs of the same browser. In the first, click F12 to open dev console and paste localStorage.setItem(‘perchanceExample’, ‘iSeeYou!’) and press Enter. You will see it appear in the local storage of the second page.
Perhaps I’m not understanding what you’re saying. Or maybe am I, and it IS possible to do it the way I suggested but there is some other valid reason for not doing it like this that I haven’t thought of. The point is, it seems like you don't really need these zip files and the fact that you have them anyway and are holding on to them indefinitely without what seems like a valid reason seems sus to me.
Each perchance page has its own local storage, which is by having a different domain. See this previous post. Then, each page is embedded on the main page, which is the top frame. By going to the Dev Console and setting the local storage there, it would be reflected on the top frame.
You can test by adding this to the HTML panel (bottom right panel after clicking 'edit') then clicking 'reload' on the bottom of the preview:
On one page and another, and it would be reflected to their respective domains on the local storage, instead of the top domain perchance.
I guess the purpose of saving the data is for ease of access and convenience for sharing instead of downloading the data - clicking import - selecting import file - confirm. Maybe the solution is to just add a 'download' button instead of creating a share link so the data is downloaded locally, but again, the steps of download - import - select file - confirm might be inconvenient for others.
As long as you don't share the link or the file id. No one should be able to access the data from it.
@perchance - I'll ping the dev again just in case.
Ah that makes sense now. I guess there isn't an easy solution to what you want to do. Also I didn't realize the sharing aspect was important. Otherwise you could pass the data from one subdomain to the other through the server with an API POST.