Commit Graph

15 Commits

Author SHA1 Message Date
tophf
809e70a89c manage: show update history button 2017-04-27 20:40:45 +03:00
tophf
f08312ab00 rephrase update messages 2017-04-26 01:36:12 +03:00
tophf
acc4d83b9d promisify DB access 2017-04-26 01:36:08 +03:00
tophf
02fd4f1abe Display "force-install" for locally edited styles on update
* Allow manually resetting locally edited style even if up-to-date
* "Check again, I didn't edit any styles!" button
2017-04-26 01:35:32 +03:00
tophf
7677f0dece updater: add 'ignoreDigest' to force-update on manage page
* saveStyle: retain only known properties in sections[] and normalize their order
* remove styleDigest on import
* shorten detailed status names in updater
* don't autohide update status message
2017-04-26 01:35:14 +03:00
tophf
32ae088c03 Detect and don't update locally edited styles 2017-04-26 01:34:57 +03:00
tophf
f9e90f9cd0 code cosmetics: simplify debounce() 2017-04-23 23:05:36 +03:00
tophf
9617d571f8 manage: reuse BG.updater 2017-04-21 15:56:21 +03:00
tophf
2e60af40f0 refactor bg updater; add prefs.subscribe() 2017-04-21 15:52:22 +03:00
tophf
5c8d1950a7 Isolate storage.js in background context
To prevent cross-page leaks we need to create/copy prefs and cachedStyles inside the background page context.

* storage.js is now used only in the background page

* messaging.js now contains less bg-specific methods and more common methods. Added saveStyleSafe, deleteStyleSafe which automatically invoke onRuntimeMessage of the current page or just handleUpdate/handleDelete when notify:false

* prefs.js with 'prefs' for background and UI pages: separate objects because a UI page may load before the background page and it can read prefs from localStorage/sync/defaults
2017-04-18 12:46:34 +03:00
tophf
26802e36df Optimize startup: coalesce & debounce prefs.set
Previously prefs.set broadcast many messages per each changed pref value to all open tabs, background page, popups. This lead to repeated and needless updates of various things like the toolbar icon, reapplying of styles, and whatnot. It could easily take more than 100ms on an average computer with many tabs open.

Now we debounce the broadcast & sync.set and coalesce all values in one object which is then sent just once per destination.
2017-04-18 12:46:28 +03:00
tophf
ac4a420e2b ESLint: customize the rules; fix the issues 2017-04-18 12:46:23 +03:00
tophf
38006847f7 Don't apply styles until import is finished 2017-03-16 13:32:12 +03:00
Jeremy Schomery
d6ec816ea9 adding options UI (fixes #22, #24) 2017-02-14 19:05:53 +03:30
Jeremy Schomery
2d1767199b implementing update checker; part 1 2017-02-08 18:45:35 +03:30