Automatic Evolve Save Upload to Gist

Automatically upload your evolve save to a gist

Mint 2024.03.20.. Lásd a legutóbbi verzió

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Fejlesztő
Alistair1231
Értékelések
0 0 0
Verzió
0.1.1
Létrehozva
2024.03.20.
Frissítve
2024.03.20.
Size
6 KB
Licensz
GPL-3.0
Érvényes

Why This?

I lost my save game 😞. To prevent this from happening again, I implemented a quick and dirty cloud backup using a GitHub Gist.

Only export is implemented and that will most likely stay so, importing is fast and pretty rare.

What does it do?

It makes a backup every 30 minutes (adjustable at the bottom of the script). The save game will be written to a gist, that is defined by the user. By using a gist, you also get the benefit of versioning. So you can roll back to earlier saves. 😉

Security Concerns

The API token is saved as plaintext, so be sure to only give it the gist scope and use a token for this purpose alone so you can revoke it if necessary. Better safe than sorry. If you are really paranoid, make a GitHub account only for this purpose. I don't want to implement encryption, that sounds like a hassle, and then you have the new issue of loosing that password as well as having to always enter it as saving the password next to the encrypted content pretty much defeats the purpose. 😁

How to use?

On first setup you will need to manually create a GitHub API key and a Gist. That is described in an alert box when you first use the script, but since I think I remember Google having plans to remove those, I will put the description here as well.
Be aware, I usually forget to update these descriptions, so if in doubt look at the code.
Also, this is only tested on Violenmonkey and Firefox. The Browser should not matter, but some other Userscript managers might handle the GM functions differently. If something does not work, try to use Violentmonkey, or message me, if I have time I might try to help.

Setup instructions

(I updated the instruction last on v0.1.0)

You will need a GistID and a Personal Access Token to use this.

Create a gist, the description does not matter, in it make a file called "save.txt" and add some random content so GitHub doesn't complain, you can do that here: https://gist.github.com Afterwards, you can find the GistID in the URL: https://gist.github.com/{{Username}}/{{GistID}}

The Personal Access Token you have to create here: https://github.com/settings/tokens you only need the gist scope.

If you make a mistake you should be asked again, alternatively you can manually set these values in the Userscript storage.

How does it work? (technical)

The script makes use of GM.xmlhttpRequest for the request and GM.setValue/GM.getValue for storing/retrieving the secrets. The timing is done with setInterval.

I hope I can prevent some people from loosing their save games, and allow for more easy switching between devices. 😊