wyantb / HashMask

A browser addon for password fields, adding a visual hash to aid in memorability.
5 stars 0 forks source link

To simple-prefs or not to simple-prefs? #52

Closed nickserv closed 11 years ago

nickserv commented 12 years ago

So unfortunately, for non-XUL addons, simple-prefs is REALLY limited. You can only have three types: string, integer, boolean. You can't limit these values, but you can have a default value for each. I doubt HTML could render on the page. There are no dropdowns or radio buttons, and with what I have currently coded for Firefox, you would need to type an integer 1-4 to choose one of our four hash algorithms, which is kind of lame. But unfortunately, unless we use XUL (and I don't think we want this), I doubt we can get much more out of simple prefs.

I do have one idea, though. I was thinking that the way you enter a salt through the simple-prefs interface is pretty insecure, since there's no way to hide the string, and you can't put extra HTML/JS on there to deal with the issue. However, apparently you can put a "control" in the options, which will run some JS when you click it, so maybe we can make salt and/or algorithm pickers through that.

Anyway, opinions? Sticking with simple-prefs makes porting slightly harder, and makes our preference page really limited, but it's the only way to stay really standard without using XUL. I think we might just want to give up on simple-prefs and go back to using our Chrome options page. Sure, it's not standard, but we can have a much better UI. And since we're gonna have a browser action ported to Firefox by 2.0 anyway, we can throw a link to the options page in there.

wyantb commented 12 years ago

How would we use the options page to actually change the settings stored in simple DB? I thought normal pages didn't have access to extension stuff?

Also, couldn't we just have a XUL settings page? Sure, probably not standard for Jetpack extensions to do this, but it looks to me like Jetpack just packages us in a full XUL addon anyway, so it would seem to me that it should be possible.

wyantb commented 11 years ago

Effective duplicate of #40