omorandi/TiInspector — pull request #20 by sukima (2014-02-27 15:58:17+00:00)
Title: Add customizable themes via console

Since a theme is nothing more then a CSS file linked into the iframe this pull request offers a `StylesConfig` object to manage a list of user defined CSS. Either through the `devtools_theme` when the user first uses the application or manually as the user adds or removes CSS URLs. The preferences are save to `localStorage` for future use.

When the application loads it will attach an instance of `StylesConfig` to `TiInspector.preferences.styles` which has the following methods:

| Method | Description |
|-----------|-------------|
| add | Adds a CSS URL to the user's preferred CSS list.
| remove | Removes a URL from the list.
| save | Will add each CSS URL to the

with tags and save the preferences to `localStorage`.
| unlinkAll | Will remove all the associated tags.

All the above methods are chainable. Internally this is a singleton class which can be grabbed with `StylesConfig.getInstance()`.