stylish-userstyles / stylish-chrome

Stylish extension for Chrome and Chrome-like things
GNU General Public License v3.0
185 stars 53 forks source link

Stop using Web SQL #167

Closed JasonBarnabe closed 8 years ago

JasonBarnabe commented 8 years ago

Web SQL is deprecated and doesn't work in Firefox. Move to something else, like IndexedDB.

tophf commented 8 years ago

IndexedDB is still reportedly slower than WebSQL according to a few tests I've seen. However for the needs of Stylish the difference might be negligible. Anyway it should be tested first in order not to make Stylish-chrome slower.

JasonBarnabe commented 8 years ago

I imagine it wouldn't be significant, especially considering Stylish is currently converting the result of the WebSQL into a JS object, while with IndexedDB this would not be necessary. In any case, Web SQL is likely going to go away even in Chrome at some point in the future, so sticking with it isn't an option.

Are you willing to work on this? I don't want to duplicate effort. The solution should include migration from the current storage.

JasonBarnabe commented 8 years ago

I've added this. The WebSQL data will get converted automatically, but not deleted. To wipe out the new DB (and re-run the migration), run this from the console:

indexedDB.deleteDatabase("stylish")