diff options
Diffstat (limited to 'background_scripts/sync.coffee')
| -rw-r--r-- | background_scripts/sync.coffee | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/background_scripts/sync.coffee b/background_scripts/sync.coffee index 3b34c5a6..b1ccb696 100644 --- a/background_scripts/sync.coffee +++ b/background_scripts/sync.coffee @@ -25,9 +25,11 @@ root.Sync = Sync = storage: chrome.storage.sync doNotSync: [ "settingsVersion", "previousVersion" ] + register: -> + chrome.storage.onChanged.addListener (changes, area) -> Sync.listener changes, area + init: -> chrome.storage.onChanged.addListener (changes, area) -> Sync.listener changes, area - @pull() # Asynchronous fetch from synced storage, called only at startup. pull: -> @@ -126,5 +128,5 @@ root.Sync = Sync = return false return true -Sync.init() +Sync.register() |
