Last active
February 26, 2023 20:07
-
-
Save mitchallen/59e974dde61e8ff839867d865c98a10f to your computer and use it in GitHub Desktop.
Example content.js file for a Chrome Extension
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
console.log("Hello, world!"); | |
chrome.storage.sync.get("color", function(data) { | |
var color = data.color || "#ffffff"; | |
document.body.style.backgroundColor = color; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment