fracture91 / ignpp

Firefox and Chrome extension for boards.ign.com
http://vestitools.pbworks.com/
3 stars 2 forks source link

Write usercolor files to a different directory #226

Closed fracture91 closed 13 years ago

fracture91 commented 13 years ago

When a file is modified in the extension's directory, compatibility updates are ignored. See: https://bugzilla.mozilla.org/show_bug.cgi?id=657019 . This behavior is basically intentional and writing to the extension's own directory is not officially supported by Firefox.

Should write the usercolor CSS and JSON files to some other place. ProfileDirectory/ign++ I guess. This means a number of things would need to be changed about files.js. You would need to be able to indicate that you want to read from the profile directory (which chrome URIs can't do AFAIK). Chrome's behavior in this case should be reading from the sandboxed file space with the filesystem API.

https://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO

This would also fix the issue where usercolors are erased when updating the extension.

Don't forget to get rid of usercolors.css and usercolors.json from the repository.

https://developer.mozilla.org/en/Extensions/Using_the_DOM_File_API_in_chrome_code This might have been useful, but it only applies to FF 6. Maybe I could implement it later, it would probably be easier than what I'm doing for Firefox file reading now.