Last active
July 23, 2019 19:06
-
-
Save tobinbc/4ae1555305366cc153f9bbff633a0691 to your computer and use it in GitHub Desktop.
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
let data = {} | |
try { | |
let json = document.getElementById('json').textContent | |
data = JSON.parse(json) | |
} catch (error) { | |
data = { | |
ok: false, | |
error: error.message | |
} | |
} | |
chrome.storage.local.set(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment