This post is a continuation of Adding an icon to our Firefox extension post. We are going to be using what we did on that post as a base for this one.
The Firefox preferences system provides and easy way of storing small amounts of data for Firefox extensions. There are more advanced systems to store data for extensions but since what we are going to store is actually a user preference we are going to save it there. There are three data types that can be used for preferences: boolean, int and char.