Created
March 26, 2020 09:43
-
-
Save codeyourwayup/1d4f92cb94a0dd55f78465df4174bbdf to your computer and use it in GitHub Desktop.
Saved from https://stackoverflow.com/questions/38425751/returning-chrome-storage-api-value-without-function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function mainFuction() { | |
var p = new Promise(function(resolve, reject){ | |
chrome.storage.sync.get({"disableautoplay": true}, function(options){ | |
resolve(options.disableautoplay); | |
}) | |
}); | |
const configOut = await p; | |
console.log(configOut); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment