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. 😊

  • BluePowerOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    8 months ago

    Thanks! I think I will keep this homemade feature for myself, but at least we got the actual feature on Perchance now.