Skip to content

Instantly share code, notes, and snippets.

@mitchallen
Created February 26, 2023 11:05
Show Gist options
  • Save mitchallen/e4fb2715480db780f2334a2701326aea to your computer and use it in GitHub Desktop.
Save mitchallen/e4fb2715480db780f2334a2701326aea to your computer and use it in GitHub Desktop.
Example background.js file for a Chrome Extension
console.log("Background script loaded!");
chrome.browserAction.onClicked.addListener(function(tab) {
// Do something when the extension button is clicked
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment