Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store backup of last 3 runs #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tionkje
Copy link
Contributor

@tionkje tionkje commented Apr 14, 2021

Create a backup of the last 3 runs of each sample.
So that at least everything is not lost on a crash.

Retrieve last backup by pasting this in the console

copy(JSON.parse(localStorage.ganjaBackup)[document.location.hash.slice(1)][0].data)

@kungfooman
Copy link
Contributor

I like the idea, but to remember such a snippet or trying to find this PR again and again to do such a simple action is very user unfriendly.

Maybe integrate it into my stash tab? Or adding a simple function to window for something like copy(lastBackup())

@tionkje
Copy link
Contributor Author

tionkje commented Apr 14, 2021

I completely agree.
This was just a first step to already have the data.
Since its 3 backups for each script i was thinking somewhere near the thumbnails? next to the delete button?
Now that i think about it the delete button should also delete the backups.

I also think there should be something of a warning/reminder when opening a script and the last saved version is older than a backup. For that a timestamp will need to be saved on backups and on saves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants