acquitelol / azalea

The cutest Sparx Maths theming and bookwork bypass extension ~!
45 stars 6 forks source link

Where is the local files stores #28

Closed UltimateBoi closed 5 months ago

UltimateBoi commented 5 months ago

Title says it but: Where are the local files stored e.g. the data for the logger for bookwork. Where is that database stored locally on my computer?

acquitelol commented 5 months ago

It is not directly stored in a file. It's just in window.localStorage in your browser, on the Sparx website.

UltimateBoi commented 5 months ago

Is there a way to import and export this?

acquitelol commented 5 months ago

Yeah, if you go to the Menu at the top right of Sparx and click on "Bookwork" you can not only view your codes that are currently stored but also export and import them.

UltimateBoi commented 5 months ago

Oh ok got it, thanks

UltimateBoi commented 5 months ago

one question, im trying to transfer my cuurrent bookwork storage over from waht i belive to be this skid extension called "Sparx Solver" here on github. it is broken now but do you know any way to extract that through commands in the console into a json or to just print it out for me to import back into azalea? appreciate any help

acquitelol commented 5 months ago

You can probably just run this code in your console while logged into Sparx:

localStorage.AzaleaBookwork = JSON.stringify({ 
    ...JSON.parse(localStorage.AzaleaBookwork), 
    ...JSON.parse(localStorage.SparxSolverBookwork) 
});

(I don't know exactly what the skid extension called it but I believe that is what it's called "SparxSolverBookwork") The code above will merge your existing codes in Azalea and the old codes from the skid extension.

You can confirm that it worked by opening the Bookwork page and seeing if your old codes are there.

UltimateBoi commented 5 months ago

Yeah thanks for this. I believe I have enough knowledge to take it from here. Thanks for all the help. I'll let you know if it works!

acquitelol commented 5 months ago

No problem!!!

UltimateBoi commented 5 months ago

You can probably just run this code in your console while logged into Sparx:

localStorage.AzaleaBookwork = JSON.stringify({ 
    ...JSON.parse(localStorage.AzaleaBookwork), 
    ...JSON.parse(localStorage.SparxSolverBookwork) 
});

(I don't know exactly what the skid extension called it but I believe that is what it's called "SparxSolverBookwork") The code above will merge your existing codes in Azalea and the old codes from the skid extension.

You can confirm that it worked by opening the Bookwork page and seeing if your old codes are there.

  • Rosie 💞

This worked, thanks so much! really appreciate this extension by the way. Only thing i would ask is a working fully dark mode. The extension "Dark Reader" worked as a dark mode up until a few weeks back so i went in search of a better dark mode or theme that's when i came across this for the 5th time or so 😂. The "Dusk" theme is nice but if you could add a fully dark theme, i would appreciate it!

acquitelol commented 5 months ago

Sure, i'll look into that!