Commit Graph

11 Commits

Author SHA1 Message Date
tophf
47eefd1cd2 code cosmetics: contextMenus use prefs.subscribe() 2017-04-21 15:52:23 +03:00
tophf
468a758cec code cosmetics: inverted "no????" params to straight ones 2017-04-21 15:52:23 +03:00
tophf
2e60af40f0 refactor bg updater; add prefs.subscribe() 2017-04-21 15:52:22 +03:00
tophf
a2943852a7 add a hidden "gray out" options for favicons 2017-04-18 21:49:04 +03:00
tophf
2304a8012c fix setupLivePrefs with multiple edit pages open 2017-04-18 12:47:24 +03:00
tophf
4eae87e606 own page load microopt: reduce blocking on prefs
postpone noncritical init stuff to window.load because first access to chrome API takes time to initialize API bindings
2017-04-18 12:47:02 +03:00
tophf
05c05ec6b9 manage: use chrome://favicon 2017-04-18 12:46:36 +03:00
tophf
2086f10af4 prefs.set: deep compare 2017-04-18 12:46:34 +03:00
tophf
8c539dabd6 prefs.set: enforce value type based on defaults 2017-04-18 12:46:34 +03:00
tophf
97c5972348 prefs: keep up-to-date using prefChanged event 2017-04-18 12:46:34 +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