Skip to content

Hightlight My Planets – Add support for persisting chosen settings#215

Closed
cristobal wants to merge 3 commits into
darkforest-eth:masterfrom
cristobal:feature/highlight-my-planets-store-settings
Closed

Hightlight My Planets – Add support for persisting chosen settings#215
cristobal wants to merge 3 commits into
darkforest-eth:masterfrom
cristobal:feature/highlight-my-planets-store-settings

Conversation

@cristobal

Copy link
Copy Markdown
Contributor

This PR adds support for persisting chosen settings to localStorage for situations such as :

  1. When closing and opening the plugin manually.
  2. One has to refresh the game site due to memory leak and/or other factors that makes game not playable anymore and a hard refresh is needed.
  3. The browser quit and/or restart of the machine
Screen.Recording.2022-03-01.at.23.21.26.mov

Comment thread content/casual/highlight-my-planets/plugin.js Outdated
Comment thread content/casual/highlight-my-planets/plugin.js Outdated
@modukon

modukon commented Mar 19, 2022

Copy link
Copy Markdown
Contributor

In theory this is an improvement to the plugin and a nice thing to have, but for security reasons we should not work with localstorage.

If you look at the readme of this repo under Contribution Guidelines it says:

No use of localstorage, overriding internal rpc timers/settings (df.contractsAPI.contractCaller), interaction with or depending on other plugins

I made an issue on how we can maybe use indexedDB instead
#174
but I dont know what the devs currently think about it

@cristobal

Copy link
Copy Markdown
Contributor Author

In theory this is an improvement to the plugin and a nice thing to have, but for security reasons we should not work with localstorage.

If you look at the readme of this repo under Contribution Guidelines it says:

No use of localstorage, overriding internal rpc timers/settings (df.contractsAPI.contractCaller), interaction with or depending on other plugins

I made an issue on how we can maybe use indexedDB instead #174 but I dont know what the devs currently think about it

Yeah i talked with @phated about this on Discord, where he has some other ideas to try out when it comes to plugins.

I can just close this PR and wait for changes to the plugin system and sumbit a new PR when the time is right 😊👍

@cristobal cristobal closed this Mar 19, 2022
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