sizzlemctwizzle / GM_config

A lightweight, reusable, cross-browser graphical settings framework for inclusion in user scripts.

Home Page:https://github.com/sizzlemctwizzle/GM_config/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load stored values before init() is called

sizzlemctwizzle opened this issue · comments

It might be necessary to access stored values before calling init() if the values determine what settings you send to init (like the language of the menu). Basically I'm thinking of calling read() in GM_configStruct and placing the result in a "stored" property, which would then be used in init().

I've thought about this more and have realized there just isn't a good way to do this. We don't know the id before init so we don't know where the values are stored. If you need to know the language of the menu before you know which settings object to pass to init then you should store that separately. With the addition of #51 you can even have this option placed in the config panel, and manage the storage of the value yourself. I've deemed this issue irrelevant and overall just a bad idea.