Commit Graph

7 Commits

Author SHA1 Message Date
tophf
1651d52776 Construct DOM via $element instead of HTML string 2017-04-18 12:47:23 +03:00
tophf
c09ee38c9e rework enforceInputRange
* enforce only in onchange
* notify on valid input immediately
* highlight invalid values
2017-04-18 12:46:36 +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
db83ce8dc3 demote getClickedStyle* to its local usage scope 2017-04-18 12:46:33 +03:00
tophf
ff84e924fa polyfill DOM enumerables for Chrome 49 2017-04-18 12:46:32 +03:00
tophf
04084864cc Reverse button order when OS is not Windows 2017-04-18 12:46:23 +03:00
tophf
4936426fa3 dom.js: extract common DOM functions 2017-04-18 12:46:22 +03:00