ka-extension / ka-extension-ts

A browser extension for Khan Academy.
MIT License
19 stars 11 forks source link

Fix localStorage saving of new scratchpads #246

Closed vExcess closed 2 years ago

vExcess commented 2 years ago

Any chance you could move this into project.ts? done; Moved code to project.ts and call function from extension-impl.ts

Also, it seems like the website is still storing revisions in local storage, even if the empty editor itself isn't updated. Perhaps it could be of use to leverage that? done; It now uses the same local storage keys as KA and in the same format instead of creating new keys. However KA doesn't reliably save the code to those local storage keys so I still need to do that.

I also make it work for SQL projects instead of just PJS and webpages. I also made it clear the waiting interval and exit the function if it isn't a new project page.