Skip to content

Instantly share code, notes, and snippets.

@ganeshjaiwal
Last active September 3, 2020 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganeshjaiwal/1bff5a2382c38bbe646cfb44b7f2890f to your computer and use it in GitHub Desktop.
Save ganeshjaiwal/1bff5a2382c38bbe646cfb44b7f2890f to your computer and use it in GitHub Desktop.
Background section in manifest with background script
/* Create background.js and add this code into it */
chrome.runtime.onInstalled.addListener((details) => {
console.log('previousVersion', details.previousVersion)
});
console.log('Event Page for Page Action');
/* Add this to manifest file to use our backgroud script */
"background": {
"scripts": ["scripts/background.js"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment