When I was starting to create a new generator and the new 2.0.20.1 update for my hub page, I was afraid of my PC randomly turning off whilst in the mid of my work, thus I was thinking of a “restore points” feature for Perchance ever since long ago. Since I don’t save generators too much, and I have a fear of accidentally losing all of my work, and since Perchance doesn’t have a “restore points” feature, I have decided to make one for myself.

I’ve recently built my own script that is attached to my custom script extension that basically adds an ability to create restore points from any generator. And here are some notable functionalities this thing has:

  • Each generator has a max of 20 saved restore points, the oldest restore points when it exceeds the limit will be deleted.
  • The auto-recovery feature will create a restore point once every 5 minutes if there have been any changes in the code since the creation of the last restore point, but if there isn’t, the timer increases to 15 minutes to avoid flooding duplicates.
  • Users could easily access the last restore point from where they last edited by clicking on the ♻️ restore button in the bar below the preview panel, it opens a new tab with the last session’s code as if it was taken straight from the last closed session. The button will always pop up if the generator remains unsaved in the last session, whether it could be accidental or not. It is hide-able, but can also be unhide-able through a function execution in the console in case the user accidentally clicks on the (hide) next to the button.
  • An option to clear all restore points from either all generators or from a specific generator, useful for cleanups and saving some space.

For now, I’m currently improving this, but this is what it currently looks like. And yeah, this homemade recovery feature has a lot of potential and could be really helpful for those who have a fear of losing all their unsaved work, especially for larger edits, if I ever release this as a separate extension or actually released as a brand-new Perchance feature. 😊

No comments yet!

Perchance - Create a Random Text Generator

!perchance@lemmy.world

Create post

⚄︎ 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.

Community stats

  • 1

    Monthly active users

  • 68

    Posts

  • 7

    Comments