diff options
| -rw-r--r-- | lib/settings.coffee | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/lib/settings.coffee b/lib/settings.coffee index adbe2bef..f0cf30f1 100644 --- a/lib/settings.coffee +++ b/lib/settings.coffee @@ -6,6 +6,11 @@ Settings =    onLoadedCallbacks: []    init: -> +    if Utils.isExtensionPage() +      # On extension pages, we use localStorage (or a copy of it) as the cache. +      @cache = if Utils.isBackgroundPage() then localStorage else extend {}, localStorage +      @onLoaded() +      chrome.storage.local.get null, (localItems) =>        localItems = {} if chrome.runtime.lastError        @storage.get null, (syncedItems) => | 
