google-chrome-storage

Returning Chrome storage API value without function

爱⌒轻易说出口 提交于 2019-11-26 12:43:43
问题 For the past two days I have been working with chrome asynchronous storage. It works \"fine\" if you have a function. (Like Below): chrome.storage.sync.get({\"disableautoplay\": true}, function(e){ console.log(e.disableautoplay); }); My problem is that I can\'t use a function with what I\'m doing. I want to just return it, like LocalStorage can. Something like: var a = chrome.storage.sync.get({\"disableautoplay\": true}); or var a = chrome.storage.sync.get({\"disableautoplay\": true},

window.localStorage vs chrome.storage.local

为君一笑 提交于 2019-11-26 07:45:20
I'm developing a Chrome extension and I need to store some data and then get it in some point. I did investigation on available storage s and came across to the following ones: window.localStorage and chrome.storage.local . So my question is, which one is the right choice to use in Chrome extensions: window.localStorage or chrome.storage.local ? P.S. I'm using browser action to load a local HTML in IFRAME . So I'm not using popup.js . jmort253 It depends entirely on what your Chrome Extension will be doing. window.localStorage is HTML5 storage. Unless you're running it in the background page,

window.localStorage vs chrome.storage.local

北慕城南 提交于 2019-11-26 01:58:40
问题 I\'m developing a Chrome extension and I need to store some data and then get it in some point. I did investigation on available storage s and came across to the following ones: window.localStorage and chrome.storage.local . So my question is, which one is the right choice to use in Chrome extensions: window.localStorage or chrome.storage.local ? P.S. I\'m using browser action to load a local HTML in IFRAME . So I\'m not using popup.js . 回答1: It depends entirely on what your Chrome Extension